summaryrefslogtreecommitdiff
path: root/apt-pkg/packagemanager.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2012-08-30 12:21:32 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2012-08-30 12:21:32 +0200
commitd4b4e5ea2ceb02699e746d52256b3a8ac2d9bda2 (patch)
tree597259a2a9ea8b96c904ba873262bbdaf0ac46ed /apt-pkg/packagemanager.cc
parent2e5aabb85447ba6f1feeb4dbbd59c70e3cc76bb9 (diff)
* apt-pkg/packagemanager.cc:
- unpack versions in case a different version from the package is currently in unpack state to recover from broken system states (like different file in M-A:same package and other dpkg errors)
Diffstat (limited to 'apt-pkg/packagemanager.cc')
-rw-r--r--apt-pkg/packagemanager.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc
index b93bf6ab9..d2d2753a8 100644
--- a/apt-pkg/packagemanager.cc
+++ b/apt-pkg/packagemanager.cc
@@ -882,7 +882,9 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate, int c
}
}
// 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)
+ else if ((instVer != Pkg.CurrentVer() ||
+ ((Cache[Pkg].iFlags & pkgDepCache::ReInstall) == pkgDepCache::ReInstall)) &&
+ Install(Pkg,FileNames[Pkg->ID]) == false)
return false;
if (Immediate == true) {