]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/packagemanager.cc
updating <date> tags and the po files for the manpages
[apt.git] / apt-pkg / packagemanager.cc
index 093999bc243e66da1727838bfaf25a46f31f4200..46fc499c615e5091cddca445f691633fbba3bef6 100644 (file)
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/sptr.h>
 
-#include <apti18n.h>
 #include <iostream>
 #include <fcntl.h>
+
+#include <apti18n.h>
                                                                        /*}}}*/
 using namespace std;
 
@@ -621,7 +622,7 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate, int c
            // Look for easy targets: packages that are already okay
            for (DepIterator Cur = Start; Bad == true; ++Cur)
            {
-              SPtrArray<Version *> VList = Start.AllTargets();
+              SPtrArray<Version *> VList = Cur.AllTargets();
               for (Version **I = VList; *I != 0; ++I)
               {
                  VerIterator Ver(Cache,*I);
@@ -644,7 +645,7 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate, int c
            // Look for something that could be configured.
            for (DepIterator Cur = Start; Bad == true; ++Cur)
            {
-              SPtrArray<Version *> VList = Start.AllTargets();
+              SPtrArray<Version *> VList = Cur.AllTargets();
               for (Version **I = VList; *I != 0; ++I)
               {
                  VerIterator Ver(Cache,*I);
@@ -784,7 +785,7 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate, int c
                           VerIterator V(Cache,*I);
                           PkgIterator P = V.ParentPkg();
                           // we are checking for installation as an easy 'protection' against or-groups and (unchosen) providers
-                          if (P->CurrentVer == 0 || P != Pkg || (P.CurrentVer() != V && Cache[P].InstallVer != V))
+                          if (P != Pkg || (P.CurrentVer() != V && Cache[P].InstallVer != V))
                              continue;
                           circle = true;
                           break;