]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/packagemanager.cc
merge with debian-experimental-ma to get the public policy back
[apt.git] / apt-pkg / packagemanager.cc
index 35cc245509e24c34d7e54ecb106dbf1be3886bcc..49776aac705b505e703e127f3300e1c566134d97 100644 (file)
@@ -345,6 +345,9 @@ bool pkgPackageManager::DepAdd(pkgOrderList &OList,PkgIterator Pkg,int Depth)
       return true;
    if (List->IsFlag(Pkg,pkgOrderList::UnPacked) == false)
       return false;
+
+   if (Debug) 
+      std::clog << OutputInDepth(Depth) << "DepAdd: " << Pkg.Name() << std::endl;
       
    // Put the package on the list
    OList.push_back(Pkg);
@@ -398,6 +401,8 @@ bool pkgPackageManager::DepAdd(pkgOrderList &OList,PkgIterator Pkg,int Depth)
       
       if (Bad == true)
       {
+        if (Debug) 
+           std::clog << OutputInDepth(Depth) << "DepAdd FAILS on: " << Pkg.Name() << std::endl;
         OList.Flag(Pkg,0,pkgOrderList::Added);
         OList.pop_back();
         Depth--;
@@ -591,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.