X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/e7b470eefa0499d0edbdda4f466eb77b17c2067b..4f00fb2f265f5230c7d138b52854c0886092c0ab:/apt-pkg/packagemanager.cc diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc index fc5f475a1..4b3dd8be2 100644 --- a/apt-pkg/packagemanager.cc +++ b/apt-pkg/packagemanager.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: packagemanager.cc,v 1.28 2001/05/27 05:36:04 jgg Exp $ +// $Id: packagemanager.cc,v 1.30 2003/04/27 03:04:15 doogie Exp $ /* ###################################################################### Package Manager - Abstacts the package manager @@ -133,7 +133,7 @@ bool pkgPackageManager::CreateOrderList() 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++) @@ -483,13 +483,16 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg) 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 @@ -590,7 +593,7 @@ pkgPackageManager::OrderResult pkgPackageManager::OrderInstall() Pkg.State() == pkgCache::PkgIterator::NeedsNothing && (Cache[Pkg].iFlags & pkgDepCache::ReInstall) != pkgDepCache::ReInstall) { - _error->Error("Internal Error, trying to manipulate a kept package"); + _error->Error("Internal Error, trying to manipulate a kept package (%s)",Pkg.Name()); return Failed; } @@ -628,11 +631,13 @@ pkgPackageManager::OrderResult pkgPackageManager::OrderInstall() // --------------------------------------------------------------------- /* This uses the filenames in FileNames and the information in the DepCache to perform the installation of packages.*/ -pkgPackageManager::OrderResult pkgPackageManager::DoInstall() +pkgPackageManager::OrderResult pkgPackageManager::DoInstall(int status_fd) { OrderResult Res = OrderInstall(); + if(Debug) + std::clog << "OrderInstall() returned: " << Res << std::endl; if (Res != Failed) - if (Go() == false) + if (Go(status_fd) == false) return Failed; return Res; }