summaryrefslogtreecommitdiff
path: root/apt-pkg/packagemanager.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2012-09-04 14:49:41 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2012-09-04 14:49:41 +0200
commit89e95aee05c7f2fde7eb11261df9697a4896b49b (patch)
tree51ab3d569d8ab1c8d3b25de1452eeb767770e0e7 /apt-pkg/packagemanager.cc
parentd7bc74a4e44c4ff97e70f15e19f86761687f2ca5 (diff)
parent92f212774bebbff6aabd3081910f570a77180911 (diff)
merged lp:~donkult/apt/sid
Diffstat (limited to 'apt-pkg/packagemanager.cc')
-rw-r--r--apt-pkg/packagemanager.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc
index b93bf6ab9..9ca6098fd 100644
--- a/apt-pkg/packagemanager.cc
+++ b/apt-pkg/packagemanager.cc
@@ -856,7 +856,10 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate, int c
This way we avoid that M-A: enabled packages are installed before
their older non-M-A enabled packages are replaced by newer versions */
bool const installed = Pkg->CurrentVer != 0;
- if (installed == true && Install(Pkg,FileNames[Pkg->ID]) == false)
+ if (installed == true &&
+ (instVer != Pkg.CurrentVer() ||
+ ((Cache[Pkg].iFlags & pkgDepCache::ReInstall) == pkgDepCache::ReInstall)) &&
+ Install(Pkg,FileNames[Pkg->ID]) == false)
return false;
for (PkgIterator P = Pkg.Group().PackageList();
P.end() == false; P = Pkg.Group().NextPkg(P))
@@ -882,7 +885,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) {