]> git.saurik.com Git - apt.git/commitdiff
unpack versions only in case a different version from the package
authorDavid Kalnischkies <kalnischkies@gmail.com>
Mon, 3 Sep 2012 10:42:22 +0000 (12:42 +0200)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Mon, 3 Sep 2012 10:42:22 +0000 (12:42 +0200)
and avoid re-unpack otherwise (Closes: #670900)

apt-pkg/packagemanager.cc
debian/changelog

index d2d2753a8fbe5d8f12fe9157344e89a0d0e715a5..9ca6098fd3715746d96479c0ef26d101c684bd8a 100644 (file)
@@ -856,7 +856,10 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate, int c
         This way we avoid that M-A: enabled packages are installed before
         their older non-M-A enabled packages are replaced by newer versions */
       bool const installed = Pkg->CurrentVer != 0;
-      if (installed == true && Install(Pkg,FileNames[Pkg->ID]) == false)
+      if (installed == true &&
+         (instVer != Pkg.CurrentVer() ||
+          ((Cache[Pkg].iFlags & pkgDepCache::ReInstall) == pkgDepCache::ReInstall)) &&
+         Install(Pkg,FileNames[Pkg->ID]) == false)
         return false;
       for (PkgIterator P = Pkg.Group().PackageList();
           P.end() == false; P = Pkg.Group().NextPkg(P))
index 67566bbe1949628b60c32c568288c928e1ea45f8..e62f0b68141e39d89705c04b72a93abdda538155 100644 (file)
@@ -11,9 +11,10 @@ apt (0.9.7.5) UNRELEASED; urgency=low
     - handle Components in the reduction for the source.list as multi-arch CDs
       otherwise create duplicated source entries (e.g. "wheezy main main")
   * apt-pkg/packagemanager.cc:
-    - unpack versions in case a different version from the package
+    - unpack versions only in case a different version from the package
       is currently in unpack state to recover from broken system states
       (like different file in M-A:same package and other dpkg errors)
+      and avoid re-unpack otherwise (Closes: #670900)
   * debian/control:
     - let libapt-pkg break apt < 0.9.4 to ensure that the installed http-
       method supports the new redirection-style, thanks to Raphael Geissert