]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/packagemanager.cc
Updated translation for 0.5.5, nearly complete.
[apt.git] / apt-pkg / packagemanager.cc
index 6101b618f5c9a98a648688aaf12255e85f6fa7a6..b0ebcdb590b75fb6746e2cc8eb53ea2ae3150f8b 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: packagemanager.cc,v 1.26 2001/02/20 07:03:17 jgg Exp $
+// $Id: packagemanager.cc,v 1.29 2002/04/02 06:01:49 jgg Exp $
 /* ######################################################################
 
    Package Manager - Abstacts the package manager
 #include <apt-pkg/sptr.h>
     
 #include <apti18n.h>    
+#include <iostream>
                                                                        /*}}}*/
 
+using namespace std;
+
 // PM::PackageManager - Constructor                                    /*{{{*/
 // ---------------------------------------------------------------------
 /* */
@@ -135,6 +138,10 @@ bool pkgPackageManager::CreateOrderList()
    // 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) &&
@@ -476,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