Sfoglia il codice sorgente

* apt-pkg/packagemanager.cc:
- do not fail on unpacked packages in SmartUnPack, just don't
shedule them for unpack, but do all checks and configure them

David Kalnischkies 14 anni fa
parent
commit
cd5e84440a
2 ha cambiato i file con 11 aggiunte e 9 eliminazioni
  1. 2 9
      apt-pkg/packagemanager.cc
  2. 9 0
      debian/changelog

+ 2 - 9
apt-pkg/packagemanager.cc

@@ -551,14 +551,6 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate, int c
       cout << endl;
       cout << endl;
    }
    }
 
 
-   // Check if it is already unpacked
-   if (Pkg.State() == pkgCache::PkgIterator::NeedsConfigure &&
-       Cache[Pkg].Keep() == true)
-   {
-      cout << OutputInDepth(Depth) << "SmartUnPack called on Package " << Pkg.Name() << " but its unpacked" << endl;
-      return false;
-   }
- 
    VerIterator const instVer = Cache[Pkg].InstVerIter(Cache);
    VerIterator const instVer = Cache[Pkg].InstVerIter(Cache);
 
 
    /* PreUnpack Checks: This loop checks and attempts to rectify and problems that would prevent the package being unpacked.
    /* PreUnpack Checks: This loop checks and attempts to rectify and problems that would prevent the package being unpacked.
@@ -768,7 +760,8 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate, int c
 	    return false;
 	    return false;
       }
       }
    }
    }
-   else if (Install(Pkg,FileNames[Pkg->ID]) == false)
+   // packages which are already unpacked don't need to be unpacked again
+   else if (Pkg.State() != pkgCache::PkgIterator::NeedsConfigure && Install(Pkg,FileNames[Pkg->ID]) == false)
       return false;
       return false;
 
 
    if (Immediate == true) {
    if (Immediate == true) {

+ 9 - 0
debian/changelog

@@ -1,3 +1,12 @@
+apt (0.8.16~exp8) experimental; urgency=low
+
+  [ David Kalnischkies ]
+  * apt-pkg/packagemanager.cc:
+    - do not fail on unpacked packages in SmartUnPack, just don't
+      shedule them for unpack, but do all checks and configure them
+
+ -- David Kalnischkies <kalnischkies@gmail.com>  Mon, 17 Oct 2011 11:21:21 +0200
+
 apt (0.8.16~exp7) experimental; urgency=low
 apt (0.8.16~exp7) experimental; urgency=low
 
 
   [ David Kalnischkies ]
   [ David Kalnischkies ]