Просмотр исходного кода

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
David Kalnischkies лет назад: 10
Родитель
Сommit
c75e60ebb6
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      apt-pkg/packagemanager.cc

+ 2 - 2
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;