瀏覽代碼

* apt-pkg/packagemanager.cc:
- don't try to "unpack" pseudo packages twice

David Kalnischkies 16 年之前
父節點
當前提交
87af68aa09
共有 2 個文件被更改,包括 13 次插入3 次删除
  1. 11 3
      apt-pkg/packagemanager.cc
  2. 2 0
      debian/changelog

+ 11 - 3
apt-pkg/packagemanager.cc

@@ -596,9 +596,17 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg)
    {
       if(Install(Pkg,FileNames[Pkg->ID]) == false)
          return false;
-   } else if (SmartUnPack(Pkg.Group().FindPkg("all")) == false)
-      return false;
-
+   } else {
+      // Pseudo packages will not be unpacked - instead we will do this
+      // for the "real" package, but only once and if it is already
+      // configured we don't need to unpack it again…
+      PkgIterator const P = Pkg.Group().FindPkg("all");
+      if (List->IsFlag(P,pkgOrderList::UnPacked) != true &&
+	  List->IsFlag(P,pkgOrderList::Configured) != true) {
+	 if (SmartUnPack(P) == false)
+	    return false;
+      }
+   }
    List->Flag(Pkg,pkgOrderList::UnPacked,pkgOrderList::States);
    
    // Perform immedate configuration of the package.

+ 2 - 0
debian/changelog

@@ -2,6 +2,8 @@ apt (0.7.26~exp4) experimental; urgency=low
 
   * apt-pkg/depcache.cc:
     - "reinstall" the correct version for a killed pseudo package
+  * apt-pkg/packagemanager.cc:
+    - don't try to "unpack" pseudo packages twice
 
  -- David Kalnischkies <kalnischkies@gmail.com>  Sat, 03 Apr 2010 14:58:39 +0200