From d8a982700668dd0d5ecf98c47b0ee5f224f4f8f4 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Tue, 5 Jul 2011 14:14:24 +0100 Subject: Fix for reinstallation of packages --- apt-pkg/packagemanager.cc | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc index 7fcaa8d41..4cba19dc0 100644 --- a/apt-pkg/packagemanager.cc +++ b/apt-pkg/packagemanager.cc @@ -475,17 +475,11 @@ bool pkgPackageManager::DepAdd(pkgOrderList &OList,PkgIterator Pkg,int Depth) Bad = false; continue; } - - // Check if this package is being re-installed - if ((Cache[Pkg].iFlags & pkgDepCache::ReInstall) == pkgDepCache::ReInstall && Cache[Pkg].InstallVer != *I && - List->IsNow(Pkg) == true && Pkg.State() == PkgIterator::NeedsNothing) { - Bad = false; - continue; - } - + // Not the install version if (Cache[Pkg].InstallVer != *I || - (Cache[Pkg].Keep() == true && Pkg.State() == PkgIterator::NeedsNothing)) + (Cache[Pkg].Keep() == true && Pkg.State() == PkgIterator::NeedsNothing && + (Cache[Pkg].iFlags & pkgDepCache::ReInstall) != pkgDepCache::ReInstall)) continue; if (List->IsFlag(Pkg,pkgOrderList::UnPacked) == true) -- cgit v1.2.3