aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-09-02 12:22:49 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-09-02 12:22:49 +0200
commit865f01bbf9e1e3b2fd2aae3c6cd4d4002adc928d (patch)
treee9cb71f1ada26b4ce58934e6bc6782b61e86bb55
parent8b7ee409621b50c1f741188f21f18f98d47e63af (diff)
Adjust bdep-sync to new bpkg-pkg-build config var passing protocol
-rw-r--r--bdep/sync.cxx17
1 files 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