summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/packagemanager.cc11
1 files changed, 2 insertions, 9 deletions
diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc
index b9ef0f5d7..a97ce4833 100644
--- a/apt-pkg/packagemanager.cc
+++ b/apt-pkg/packagemanager.cc
@@ -551,14 +551,6 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate, int c
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);
/* 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;
}
}
- 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;
if (Immediate == true) {