]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/packagemanager.cc
Changed check in the SmartUnpack method, reverted change in the DepAdd method.
[apt.git] / apt-pkg / packagemanager.cc
index 2219f876a857b78d7906c3d1874749335f8b4d18..ac11b5d5153f6304459a2a10d9cb066a9d41128c 100644 (file)
@@ -278,7 +278,7 @@ bool pkgPackageManager::ConfigureAll()
    {
       PkgIterator Pkg(Cache,*I);
 
-      if (ConfigurePkgs == true && VerifyConfigure(Pkg,OList) == false)
+      if (ConfigurePkgs == true && VerifyAndConfigure(Pkg,OList) == false)
         return false;
       
       List->Flag(Pkg,pkgOrderList::Configured,pkgOrderList::States);
@@ -313,7 +313,7 @@ bool pkgPackageManager::SmartConfigure(PkgIterator Pkg)
    {
       PkgIterator Pkg(Cache,*I);
       
-      if (ConfigurePkgs == true && VerifyConfigure(Pkg,OList) == false)
+      if (ConfigurePkgs == true && VerifyAndConfigure(Pkg,OList) == false)
         return false;
       
       List->Flag(Pkg,pkgOrderList::Configured,pkgOrderList::States);
@@ -416,7 +416,7 @@ bool pkgPackageManager::VerifyConfigure(PkgIterator Pkg, pkgOrderList &OList)
    configures it  */
 bool pkgPackageManager::VerifyAndConfigure(PkgIterator Pkg, pkgOrderList &OList)
 {
-   if (VerifyConfigure(Pkg, OList))
+   if (VerifyConfigure(Pkg, OList)) 
       return Configure(Pkg);
    else
       return false;
@@ -685,8 +685,9 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate)
         {
            VerIterator Ver(Cache,*I);
            PkgIterator Pkg = Ver.ParentPkg();
-           // Found a break, so unpack the package
-           if (List->IsNow(Pkg)) {
+           // Check if it needs to be unpacked
+           if (List->IsFlag(Pkg,pkgOrderList::InList) && Cache[Pkg].Delete() == false) {
+             // Found a break, so unpack the package
              SmartUnPack(Pkg, false);
            }
         }