// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: packagemanager.cc,v 1.27 2001/05/07 05:49:43 jgg Exp $
+// $Id: packagemanager.cc,v 1.30 2003/04/27 03:04:15 doogie Exp $
/* ######################################################################
Package Manager - Abstacts the package manager
delete List;
List = new pkgOrderList(&Cache);
- bool NoImmConfigure = _config->FindB("APT::Immediate-Configure",false);
+ bool NoImmConfigure = !_config->FindB("APT::Immediate-Configure",true);
// Generate the list of affected packages and sort it
for (PkgIterator I = Cache.PkgBegin(); I.end() == false; I++)
{
+ // Ignore no-version packages
+ if (I->VersionList == 0)
+ continue;
+
// Mark the package and its dependends for immediate configuration
if (((I->Flags & pkgCache::Flag::Essential) == pkgCache::Flag::Essential ||
(I->Flags & pkgCache::Flag::Important) == pkgCache::Flag::Important) &&
Bad = !SmartConfigure(Pkg);
}
-
+
/* If this or element did not match then continue on to the
- next or element until a matching element is found*/
+ next or element until a matching element is found */
if (Bad == true)
- {
+ {
+ // This triggers if someone make a pre-depends/depend loop.
if (Start == End)
- return _error->Error("Internal Error, Couldn't configure a pre-depend");
+ return _error->Error("Couldn't configure pre-depend %s for %s, "
+ "probably a dependency cycle.",
+ End.TargetPkg().Name(),Pkg.Name());
Start++;
}
else