From 518746f7e03115eb7bdf894d23e74ae115c8717b Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Sun, 24 Jul 2022 15:44:13 +0200 Subject: Add flag to disable upgrade by source and test case --- apt-pkg/depcache.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'apt-pkg/depcache.cc') diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index 6aa1fe946..bc5843153 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -1497,6 +1497,10 @@ static bool MarkInstall_UpgradeOrRemoveConflicts(pkgDepCache &Cache, bool const static bool MarkInstall_UpgradeOtherBinaries(pkgDepCache &Cache, bool const DebugAutoInstall, unsigned long Depth, bool const ForceImportantDeps, pkgCache::PkgIterator Pkg, pkgCache::VerIterator Ver) /*{{{*/ { APT::PackageSet toUpgrade; + + if (not _config->FindB("APT::Get::Upgrade-By-Source-Package", true)) + return true; + auto SrcGrp = Cache.FindGrp(Ver.SourcePkgName()); for (auto OtherBinary = SrcGrp.VersionsInSource(); not OtherBinary.end(); OtherBinary = OtherBinary.NextInSource()) { -- cgit v1.2.3-70-g09d2