diff options
author | Christopher Baines <cbaines8@gmail.com> | 2011-07-05 14:14:24 +0100 |
---|---|---|
committer | Christopher Baines <cbaines8@gmail.com> | 2011-07-05 14:14:24 +0100 |
commit | d8a982700668dd0d5ecf98c47b0ee5f224f4f8f4 (patch) | |
tree | 575725b453fd31bc51d11f9c80ca62ee65551497 | |
parent | eef7133842d6fe5847daa0ab4846b5e8be892d61 (diff) |
Fix for reinstallation of packages
-rw-r--r-- | apt-pkg/packagemanager.cc | 12 |
1 files 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) |