summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
1cecd43)
More inprovements to the package manager to prevent packages from being configured
twice.
sighandler_t old_SIGINT = signal(SIGINT,SigINT);
// Check here for any SIGINT
sighandler_t old_SIGINT = signal(SIGINT,SigINT);
// Check here for any SIGINT
- if (pkgPackageManager::SigINTStop) break;
+ if (pkgPackageManager::SigINTStop &&
+ (I->Op == Item::Install || I->Op == Item::Remove || I->Op == Item::Purge)) break;
// ignore SIGHUP as well (debian #463030)
sighandler_t old_SIGHUP = signal(SIGHUP,SIG_IGN);
// ignore SIGHUP as well (debian #463030)
sighandler_t old_SIGHUP = signal(SIGHUP,SIG_IGN);
- cout << " -- SIGINT -- " << endl;
if (_config->FindB("APT::Immediate-Configure-All",false))
pkgPackageManager::SigINTStop = true;
}
if (_config->FindB("APT::Immediate-Configure-All",false))
pkgPackageManager::SigINTStop = true;
}
for (pkgOrderList::iterator I = OList.begin(); I != OList.end(); I++)
{
PkgIterator Pkg(Cache,*I);
for (pkgOrderList::iterator I = OList.begin(); I != OList.end(); I++)
{
PkgIterator Pkg(Cache,*I);
+
+ /* Check if the package has been configured, this can happen if SmartConfigure
+ calls its self */
+ if (List->IsFlag(Pkg,pkgOrderList::Configured)) continue;
if (ConfigurePkgs == true && SmartConfigure(Pkg) == false) {
_error->Error("Internal error, packages left unconfigured. %s",Pkg.Name());
if (ConfigurePkgs == true && SmartConfigure(Pkg) == false) {
_error->Error("Internal error, packages left unconfigured. %s",Pkg.Name());
static std::string const conf = _config->Find("PackageManager::Configure","all");
static bool const ConfigurePkgs = (conf == "all" || conf == "smart");
static std::string const conf = _config->Find("PackageManager::Configure","all");
static bool const ConfigurePkgs = (conf == "all" || conf == "smart");
+ if (List->IsFlag(Pkg,pkgOrderList::Configured))
+ return _error->Error("Internal configure error on '%s'. ",Pkg.Name(),1);
+
if (ConfigurePkgs == true && Configure(Pkg) == false)
return false;
if (ConfigurePkgs == true && Configure(Pkg) == false)
return false;
if (Cache[Pkg].InstallVer != *I ||
(Cache[Pkg].Keep() == true && Pkg.State() == PkgIterator::NeedsNothing))
continue;
if (Cache[Pkg].InstallVer != *I ||
(Cache[Pkg].Keep() == true && Pkg.State() == PkgIterator::NeedsNothing))
continue;
+
+ if (List->IsFlag(Pkg,pkgOrderList::Configured)) {
+ Bad = false;
+ continue;
+ }
if (Debug)
clog << "Trying to SmartConfigure " << Pkg.Name() << endl;
if (Debug)
clog << "Trying to SmartConfigure " << Pkg.Name() << endl;