Explorar o código

* apt-pkg/packagemanager.cc:
- ignore breaks on not-installed versions while searching for
breakage loops as we don't have to avoid them

David Kalnischkies %!s(int64=14) %!d(string=hai) anos
pai
achega
3e9ab9f0a8
Modificáronse 2 ficheiros con 11 adicións e 2 borrados
  1. 7 1
      apt-pkg/packagemanager.cc
  2. 4 1
      debian/changelog

+ 7 - 1
apt-pkg/packagemanager.cc

@@ -682,7 +682,13 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate, int c
 	    VerIterator Ver(Cache,*I);
 	    VerIterator Ver(Cache,*I);
 	    PkgIterator BrokenPkg = Ver.ParentPkg();
 	    PkgIterator BrokenPkg = Ver.ParentPkg();
 	    VerIterator InstallVer(Cache,Cache[BrokenPkg].InstallVer);
 	    VerIterator InstallVer(Cache,Cache[BrokenPkg].InstallVer);
-	    
+	    if (BrokenPkg.CurrentVer() != Ver)
+	    {
+	       if (Debug)
+		  std::clog << OutputInDepth(Depth) << "  Ignore not-installed version " << Ver.VerStr() << " of " << Pkg.FullName() << " for " << End << std::endl;
+	       continue;
+	    }
+
 	    // Check if it needs to be unpacked
 	    // Check if it needs to be unpacked
 	    if (List->IsFlag(BrokenPkg,pkgOrderList::InList) && Cache[BrokenPkg].Delete() == false && 
 	    if (List->IsFlag(BrokenPkg,pkgOrderList::InList) && Cache[BrokenPkg].Delete() == false && 
 	        List->IsNow(BrokenPkg)) {
 	        List->IsNow(BrokenPkg)) {

+ 4 - 1
debian/changelog

@@ -7,8 +7,11 @@ apt (0.8.16~exp12) experimental; urgency=low
   [ David Kalnischkies ]
   [ David Kalnischkies ]
   * apt-pkg/cacheiterators.h:
   * apt-pkg/cacheiterators.h:
     - return the correct version arch for all+foreign, too
     - return the correct version arch for all+foreign, too
+  * apt-pkg/packagemanager.cc:
+    - ignore breaks on not-installed versions while searching for
+      breakage loops as we don't have to avoid them
 
 
- -- David Kalnischkies <kalnischkies@gmail.com>  Thu, 19 Jan 2012 18:38:33 +0100
+ -- David Kalnischkies <kalnischkies@gmail.com>  Thu, 19 Jan 2012 22:46:38 +0100
 
 
 apt (0.8.16~exp11) experimental; urgency=low
 apt (0.8.16~exp11) experimental; urgency=low