summaryrefslogtreecommitdiff
path: root/apt-pkg/depcache.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2022-07-24 15:44:13 +0200
committerJulian Andres Klode <julian.klode@canonical.com>2022-07-24 15:44:13 +0200
commit518746f7e03115eb7bdf894d23e74ae115c8717b (patch)
treedf3080a1e3c03bb6257cbca2607fe089cacdebbb /apt-pkg/depcache.cc
parentc4bab3c93567fd5a17652e453d4a65d7c83eb4fb (diff)
Add flag to disable upgrade by source and test case
Diffstat (limited to 'apt-pkg/depcache.cc')
-rw-r--r--apt-pkg/depcache.cc4
1 files changed, 4 insertions, 0 deletions
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())
{