From 272dd3d81b1e7f2f0ce98dc19299a84f027e4b59 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sat, 4 Jun 2016 14:26:47 +0300 Subject: Quote build2 operations arguments --- bpkg/cfg-create.cxx | 3 ++- bpkg/pkg-command.cxx | 4 +++- bpkg/pkg-configure.cxx | 8 ++++---- bpkg/pkg-disfigure.cxx | 12 ++++++------ 4 files changed, 15 insertions(+), 12 deletions(-) (limited to 'bpkg') diff --git a/bpkg/cfg-create.cxx b/bpkg/cfg-create.cxx index 6d727fd..3d2121e 100644 --- a/bpkg/cfg-create.cxx +++ b/bpkg/cfg-create.cxx @@ -136,7 +136,8 @@ namespace bpkg // Configure. // - run_b (o, c, "configure(" + c.string () + "/)", true, vars); // Run quiet. + // Run quiet. + run_b (o, c, "configure('" + c.string () + "/')", true, vars); // Create .bpkg/. // diff --git a/bpkg/pkg-command.cxx b/bpkg/pkg-command.cxx index 57c3f53..4f5478d 100644 --- a/bpkg/pkg-command.cxx +++ b/bpkg/pkg-command.cxx @@ -61,8 +61,10 @@ namespace bpkg if (bspec.back () != '(') bspec += ' '; + + bspec += '\''; bspec += out_root.string (); - bspec += '/'; + bspec += "/'"; if (!pv.vars.empty ()) run (pv.vars); // Run this package. diff --git a/bpkg/pkg-configure.cxx b/bpkg/pkg-configure.cxx index e17ac01..6027269 100644 --- a/bpkg/pkg-configure.cxx +++ b/bpkg/pkg-configure.cxx @@ -105,11 +105,11 @@ namespace bpkg string bspec; if (src_root == out_root) - bspec = "configure(" + out_root.string () + "/)"; + bspec = "configure('" + out_root.string () + "/')"; else - bspec = "configure(" + - src_root.string () + "/@" + - out_root.string () + "/)"; + bspec = "configure('" + + src_root.string () + "/'@'" + + out_root.string () + "/')"; l4 ([&]{trace << "buildspec: " << bspec;}); diff --git a/bpkg/pkg-disfigure.cxx b/bpkg/pkg-disfigure.cxx index 282bc82..cb3e657 100644 --- a/bpkg/pkg-disfigure.cxx +++ b/bpkg/pkg-disfigure.cxx @@ -74,8 +74,8 @@ namespace bpkg if (p->state == package_state::configured) { - bspec = "clean(" + out_root.string () + "/) " - "disfigure(" + out_root.string () + "/)"; + bspec = "clean('" + out_root.string () + "/') " + "disfigure('" + out_root.string () + "/')"; } else { @@ -84,11 +84,11 @@ namespace bpkg // partially configured one. // if (src_root == out_root) - bspec = "disfigure(" + out_root.string () + "/)"; + bspec = "disfigure('" + out_root.string () + "/')"; else - bspec = "disfigure(" + - src_root.string () + "/@" + - out_root.string () + "/)"; + bspec = "disfigure('" + + src_root.string () + "/'@'" + + out_root.string () + "/')"; } l4 ([&]{trace << "buildspec: " << bspec;}); -- cgit v1.1