]> git.saurik.com Git - apt.git/commitdiff
Fix for reinstallation of packages
authorChristopher Baines <cbaines8@gmail.com>
Tue, 5 Jul 2011 13:14:24 +0000 (14:14 +0100)
committerChristopher Baines <cbaines8@gmail.com>
Tue, 5 Jul 2011 13:14:24 +0000 (14:14 +0100)
apt-pkg/packagemanager.cc

index 7fcaa8d41700cdcfb9bbe329e65865039ae4163a..4cba19dc027e1ffa84c112fdf67a4180f393a93a 100644 (file)
@@ -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)