diff options
author | Michael Vogt <egon@debian-devbox> | 2012-10-17 10:12:41 +0200 |
---|---|---|
committer | Michael Vogt <egon@debian-devbox> | 2012-10-17 10:12:41 +0200 |
commit | 32ed73df439850ee47e5e5edb8bfe1fe647ed794 (patch) | |
tree | 3a36260d49079236ae8c3c100de02455eed2d86e /apt-pkg/packagemanager.cc | |
parent | d624605d4a750ba8005b19b270c3a1617bbb9f72 (diff) | |
parent | 27a83019db71c604eb6eaecd4feed09ba376e980 (diff) |
merged from debian-sid
Diffstat (limited to 'apt-pkg/packagemanager.cc')
-rw-r--r-- | apt-pkg/packagemanager.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc index 46fc499c6..9ca6098fd 100644 --- a/apt-pkg/packagemanager.cc +++ b/apt-pkg/packagemanager.cc @@ -643,7 +643,7 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate, int c } // Look for something that could be configured. - for (DepIterator Cur = Start; Bad == true; ++Cur) + for (DepIterator Cur = Start; Bad == true && Cur.end() == false; ++Cur) { SPtrArray<Version *> VList = Cur.AllTargets(); for (Version **I = VList; *I != 0; ++I) @@ -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) { |