]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/packagemanager.cc
ensure that the right architecture is used for cross-dependencies in
[apt.git] / apt-pkg / packagemanager.cc
index b56619ef53c33abd2107c8c9bb311050851d610b..b93bf6ab9e5fb2302c24a5e70838d6448fcd7352 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;
 
@@ -642,7 +643,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)
+           for (DepIterator Cur = Start; Bad == true && Cur.end() == false; ++Cur)
            {
               SPtrArray<Version *> VList = Cur.AllTargets();
               for (Version **I = VList; *I != 0; ++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;