From c75e60ebb6bc7a578b57e7c4e01579798bae720b Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 13 Apr 2016 16:24:12 +0200 Subject: recheck Pre-Depends satisfaction in SmartConfigure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- apt-pkg/packagemanager.cc | 4 ++-- 1 file 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; -- cgit v1.2.3