diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2012-09-03 12:42:22 +0200 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2012-09-03 12:42:22 +0200 |
commit | 3663572002ef82c146c125afea8942fe842f25c4 (patch) | |
tree | 9fb5819edb4d2c2c3b5abac3011cc2653ff5286d /apt-pkg/packagemanager.cc | |
parent | c45233eaf6d08bb6bb6e2dbb57c90a1d52ca9a43 (diff) |
unpack versions only in case a different version from the package
and avoid re-unpack otherwise (Closes: #670900)
Diffstat (limited to 'apt-pkg/packagemanager.cc')
-rw-r--r-- | apt-pkg/packagemanager.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc index d2d2753a8..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)) |