]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/packagemanager.cc
merged lp:~mvo/apt/conflicts-on-virtuals to better deal with
[apt.git] / apt-pkg / packagemanager.cc
index 034cc83393ded9cd893a82bbfab634421a383bdf..49776aac705b505e703e127f3300e1c566134d97 100644 (file)
@@ -596,9 +596,18 @@ 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 &&
+         P.State() != pkgCache::PkgIterator::NeedsNothing) {
+        if (SmartUnPack(P) == false)
+           return false;
+      }
+   }
    List->Flag(Pkg,pkgOrderList::UnPacked,pkgOrderList::States);
    
    // Perform immedate configuration of the package.