summaryrefslogtreecommitdiff
path: root/apt-private/private-install.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2018-01-26 16:15:13 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2018-05-11 17:58:46 +0200
commit9169cd5049bd7f0d5dcc56c40d567a766cf5b851 (patch)
treef8ba50406de8e2f9539e00451bff5c22795a14e3 /apt-private/private-install.cc
parentb0283a5aeee428c9f2567b81ae78c9da68f6f4af (diff)
Extend apt build-dep pkg/release to switch dep as needed
apt install pkg/release follows versioned dependencies in the candidate switching if the current candidate does not satisfy the dependency, so for uniformity the same should be supported in build-dep.
Diffstat (limited to 'apt-private/private-install.cc')
-rw-r--r--apt-private/private-install.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/apt-private/private-install.cc b/apt-private/private-install.cc
index e1beb21c6..c9e45cc00 100644
--- a/apt-private/private-install.cc
+++ b/apt-private/private-install.cc
@@ -945,13 +945,21 @@ bool TryToInstall::propergateReleaseCandiateSwitching(std::list<std::pair<pkgCac
c != Changed.end(); ++c)
{
if (c->second.end() == true)
+ {
+ auto const pkgname = c->first.ParentPkg().FullName(true);
+ if (APT::String::Startswith(pkgname, "builddeps:"))
+ continue;
ioprintf(out, _("Selected version '%s' (%s) for '%s'\n"),
- c->first.VerStr(), c->first.RelStr().c_str(), c->first.ParentPkg().FullName(true).c_str());
+ c->first.VerStr(), c->first.RelStr().c_str(), pkgname.c_str());
+ }
else if (c->first.ParentPkg()->Group != c->second.ParentPkg()->Group)
{
+ auto pkgname = c->second.ParentPkg().FullName(true);
+ if (APT::String::Startswith(pkgname, "builddeps:"))
+ pkgname.replace(0, strlen("builddeps"), "src");
pkgCache::VerIterator V = (*Cache)[c->first.ParentPkg()].CandidateVerIter(*Cache);
ioprintf(out, _("Selected version '%s' (%s) for '%s' because of '%s'\n"), V.VerStr(),
- V.RelStr().c_str(), V.ParentPkg().FullName(true).c_str(), c->second.ParentPkg().FullName(true).c_str());
+ V.RelStr().c_str(), V.ParentPkg().FullName(true).c_str(), pkgname.c_str());
}
}
return Success;