Browse Source

* apt-pkg/depcache.cc:
- Only try upgrade for Breaks if there is a newer version, otherwise
handle it as Conflicts (by removing it) (helps for #591881).

Julian Andres Klode 16 years ago
parent
commit
736f67512b
2 changed files with 11 additions and 3 deletions
  1. 6 3
      apt-pkg/depcache.cc
  2. 5 0
      debian/changelog

+ 6 - 3
apt-pkg/depcache.cc

@@ -1425,10 +1425,13 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst,
 	    VerIterator Ver(*this,*I);
 	    PkgIterator Pkg = Ver.ParentPkg();
 
-	    if (Start->Type != Dep::DpkgBreaks)
-	       MarkDelete(Pkg,false,Depth + 1, false);
-	    else if (PkgState[Pkg->ID].CandidateVer != *I)
+	    
+	       
+	    if (PkgState[Pkg->ID].CandidateVer != *I &&
+	        Start->Type == Dep::DpkgBreaks)
 	       MarkInstall(Pkg,true,Depth + 1, false, ForceImportantDeps);
+	    else
+	       MarkDelete(Pkg,false,Depth + 1, false);
 	 }
 	 continue;
       }      

+ 5 - 0
debian/changelog

@@ -8,6 +8,11 @@ apt (0.7.26~exp13) UNRELEASEDexperimental; urgency=low
   * apt-pkg/cdrom.cc:
     - fix off-by-one error in DropBinaryArch
 
+  [ Julian Andres Klode ]
+  * apt-pkg/depcache.cc:
+    - Only try upgrade for Breaks if there is a newer version, otherwise
+      handle it as Conflicts (by removing it) (helps for #591881).
+
  -- Michael Vogt <michael.vogt@ubuntu.com>  Fri, 30 Jul 2010 17:37:14 +0200
 
 apt (0.7.26~exp12) experimental; urgency=low