diff options
author | David Kalnischkies <david@kalnischkies.de> | 2016-04-13 16:24:12 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2016-04-13 21:33:32 +0200 |
commit | c75e60ebb6bc7a578b57e7c4e01579798bae720b (patch) | |
tree | 635cdb7e75bde49ac6e85bdde6fd74f26c190043 /apt-pkg | |
parent | f41352ade22b159c0057f45bcc656dd893d5e74a (diff) |
recheck Pre-Depends satisfaction in SmartConfigure
Regression introduced in commit 590f1923121815b36ef889033c1c416a23cbe9a2
(2011!) causing apt to not check if Pre-Depends are satisfied before
calling --configure. This managed to hide so perfectly well for years as
Pre-Depends aren't that common, apt prefers upgrading these packages
first and checks for satisfaction is already in SmartUnpack, so there
is only a small window of oppertunity to break a pre-dependency relation
(usually with an unpack).
Verified by logchecking with two provided status files in the buglog.
I would have liked to write a test, but I wasn't able to reach the needed
complexity to get apt to fail – but the change is small and reasonable,
so what could possible go wrong™, right?
LP: #1569099
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/packagemanager.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc index d75980e5e..b4e803a6e 100644 --- a/apt-pkg/packagemanager.cc +++ b/apt-pkg/packagemanager.cc @@ -408,7 +408,7 @@ bool pkgPackageManager::SmartConfigure(PkgIterator Pkg, int const Depth) pkgCache::DepIterator Start, End; D.GlobOr(Start,End); - if (End->Type != pkgCache::Dep::Depends) + if (End->Type != pkgCache::Dep::Depends && End->Type != pkgCache::Dep::PreDepends) continue; Bad = true; @@ -534,7 +534,7 @@ bool pkgPackageManager::SmartConfigure(PkgIterator Pkg, int const Depth) Discard.GlobOr(Start,End); } - if (End->Type != pkgCache::Dep::Depends) + if (End->Type != pkgCache::Dep::Depends && End->Type != pkgCache::Dep::PreDepends) continue; Bad = true; |