From aff2607a28b72279257eb2756c74abd91b4a3960 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 20 Apr 2017 20:46:24 +0300 Subject: Get rid of libbbot::variable --- bbot/machine-manifest | 5 ++++- bbot/machine-manifest.cxx | 8 ++++++++ bbot/worker.cxx | 5 +---- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/bbot/machine-manifest b/bbot/machine-manifest index 9975a3b..ec14c3f 100644 --- a/bbot/machine-manifest +++ b/bbot/machine-manifest @@ -35,7 +35,10 @@ namespace bbot public: machine_type type; optional mac; // Required in bootstrapped machine manifest. - optional options; + optional options; // Note: could be quoted. + + strings + unquoted_options (); // Return empty if absent. machine_manifest (std::string i, std::string n, diff --git a/bbot/machine-manifest.cxx b/bbot/machine-manifest.cxx index 2edf3dc..debdbcc 100644 --- a/bbot/machine-manifest.cxx +++ b/bbot/machine-manifest.cxx @@ -212,6 +212,14 @@ namespace bbot s.next ("", ""); // End of manifest. } + strings machine_manifest:: + unquoted_options () + { + return options + ? string_parser::unquote (*options) + : strings (); + } + // toolchain_manifest // toolchain_manifest:: diff --git a/bbot/worker.cxx b/bbot/worker.cxx index a2e53b2..bd706a8 100644 --- a/bbot/worker.cxx +++ b/bbot/worker.cxx @@ -178,10 +178,6 @@ build (size_t argc, const char* argv[]) // const vector_view env (argv + 1, argc - 1); - vector cfg; - for (const variable& v: tm.config) - cfg.push_back (v.unquoted ()); - // Use target (if present) or machine as configuration directory name. // dir_path dir (tm.target ? tm.target->string () : tm.machine); @@ -190,6 +186,7 @@ build (size_t argc, const char* argv[]) "create", "-d", dir.string (), "--wipe", + tm.unquoted_config (), cfg, env); -- cgit v1.1