From d4b4e5ea2ceb02699e746d52256b3a8ac2d9bda2 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 30 Aug 2012 12:21:32 +0200 Subject: * 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) --- apt-pkg/packagemanager.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'apt-pkg') 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) { -- cgit v1.2.3-70-g09d2