]> git.saurik.com Git - apt.git/blobdiff - apt-private/private-source.cc
allow default build-essentials to be overridden
[apt.git] / apt-private / private-source.cc
index 5cd0a6628ec07965b61d59012c0ddcf7f057c1cd..96344d7ab00a5d70972b3942a5aba98836b01072 100644 (file)
@@ -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);