summaryrefslogtreecommitdiff
path: root/apt-private
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-12-29 12:41:23 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2016-12-31 02:29:20 +0100
commitabbe74b2b4690b9138da94d26a7e45ad80a3bf6c (patch)
tree7da19452188d42c6199e5b7453e6a866a31fce36 /apt-private
parent0c646119dea438abb3ee8797994d016ba6834cd2 (diff)
downloadapt-abbe74b2b4690b9138da94d26a7e45ad80a3bf6c.tar.gz
allow default build-essentials to be overridden
The config list APT::Build-Essential gets a similar treatment to other lists now by having the value of the option itself be an override for the list allowing to disable build-essentials entirely as well as adding/overriding as usual by now in other lists. Reported-By: Johannes 'josch' Schauer on IRC
Diffstat (limited to 'apt-private')
-rw-r--r--apt-private/private-source.cc10
1 files changed, 3 insertions, 7 deletions
diff --git a/apt-private/private-source.cc b/apt-private/private-source.cc
index 5cd0a6628..96344d7ab 100644
--- a/apt-private/private-source.cc
+++ b/apt-private/private-source.cc
@@ -668,16 +668,12 @@ bool DoBuildDep(CommandLine &CmdL)
// deal with the build essentials first
{
std::vector<pkgSrcRecords::Parser::BuildDepRec> BuildDeps;
- Configuration::Item const *Opts = _config->Tree("APT::Build-Essential");
- if (Opts)
- Opts = Opts->Child;
- for (; Opts; Opts = Opts->Next)
+ for (auto && opt: _config->FindVector("APT::Build-Essential"))
{
- if (Opts->Value.empty() == true)
+ if (opt.empty())
continue;
-
pkgSrcRecords::Parser::BuildDepRec rec;
- rec.Package = Opts->Value;
+ rec.Package = std::move(opt);
rec.Type = pkgSrcRecords::Parser::BuildDependIndep;
rec.Op = 0;
BuildDeps.push_back(rec);