aboutsummaryrefslogtreecommitdiff
path: root/bdep/init.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-05-10 06:43:44 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-05-10 06:43:44 +0200
commite3133aa9628858bcfe414f95731831b5962358c7 (patch)
tree0c892fa9a8b84c664e92f1874327d3faeeaab31a /bdep/init.cxx
parent8432e7eede97c2bb324c7b6578eaf9a1a2ae4282 (diff)
Support passing additional arguments to pkg-build in sync, init, new
Diffstat (limited to 'bdep/init.cxx')
-rw-r--r--bdep/init.cxx25
1 files changed, 14 insertions, 11 deletions
diff --git a/bdep/init.cxx b/bdep/init.cxx
index 603a567..1c885eb 100644
--- a/bdep/init.cxx
+++ b/bdep/init.cxx
@@ -60,7 +60,8 @@ namespace bdep
const dir_path& prj,
database& db,
const configurations& cfgs,
- const package_locations& pkgs)
+ const package_locations& pkgs,
+ const strings& pkg_args)
{
// We do each configuration in a separate transaction so that our state
// reflects the bpkg configuration as closely as possible.
@@ -117,12 +118,12 @@ namespace bdep
db.update (c);
t.commit ();
- cmd_sync (o, prj, c, false /* implicit */);
+ cmd_sync (o, prj, c, pkg_args, false /* implicit */);
}
}
int
- cmd_init (const cmd_init_options& o, cli::scanner& args)
+ cmd_init (const cmd_init_options& o, cli::group_scanner& args)
{
tracer trace ("init");
@@ -192,15 +193,12 @@ namespace bdep
args,
ca,
cc));
-
- // Fall through.
}
-
- // If this is the default mode, then find the configurations the user
- // wants us to use.
- //
- if (cfgs.empty ())
+ else
{
+ // If this is the default mode, then find the configurations the user
+ // wants us to use.
+ //
transaction t (db.begin ());
cfgs = find_configurations (prj, t, o);
t.commit ();
@@ -209,7 +207,12 @@ namespace bdep
// Initialize each package in each configuration.
//
- cmd_init (o, prj, db, cfgs, pp.packages);
+ cmd_init (o,
+ prj,
+ db,
+ cfgs,
+ pp.packages,
+ scan_arguments (args) /* pkg_args */);
return 0;
}