From 865f01bbf9e1e3b2fd2aae3c6cd4d4002adc928d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 2 Sep 2019 12:22:49 +0200 Subject: Adjust bdep-sync to new bpkg-pkg-build config var passing protocol --- bdep/sync.cxx | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/bdep/sync.cxx b/bdep/sync.cxx index 25431d6..3c51882 100644 --- a/bdep/sync.cxx +++ b/bdep/sync.cxx @@ -243,6 +243,17 @@ namespace bdep strings args; strings reps; + // First add configuration variables from pkg_args, if any. + // + { + for (const string& a: pkg_args) + if (a.find ('=') != string::npos) + args.push_back (a); + + if (!args.empty ()) + args.push_back ("--"); + } + for (const project& prj: prjs) { if (prj.fetch) @@ -309,9 +320,11 @@ namespace bdep } } - // Finally, add pkg_args, if any. + // Finally, add packages from pkg_args, if any. // - args.insert (args.end (), pkg_args.begin (), pkg_args.end ()); + for (const string& a: pkg_args) + if (a.find ('=') == string::npos) + args.push_back (a); // We do a separate fetch instead of letting pkg-build do it. This way we // get better control of the diagnostics (no "fetching ..." for the -- cgit v1.1