diff options
-rw-r--r-- | bpkg/bpkg-options.cli | 78 | ||||
-rw-r--r-- | bpkg/bpkg.cxx | 22 | ||||
-rw-r--r-- | bpkg/build | 17 | ||||
-rw-r--r-- | bpkg/buildfile | 20 | ||||
-rw-r--r-- | bpkg/cfg-add | 17 | ||||
-rw-r--r-- | bpkg/cfg-add-options.cli (renamed from bpkg/rep-add-options.cli) | 12 | ||||
-rw-r--r-- | bpkg/cfg-add.cxx (renamed from bpkg/rep-add.cxx) | 10 | ||||
-rw-r--r-- | bpkg/cfg-fetch | 17 | ||||
-rw-r--r-- | bpkg/cfg-fetch-options.cli (renamed from bpkg/rep-fetch-options.cli) | 12 | ||||
-rw-r--r-- | bpkg/cfg-fetch.cxx (renamed from bpkg/rep-fetch.cxx) | 18 | ||||
-rw-r--r-- | bpkg/common-options.cli | 2 | ||||
-rw-r--r-- | bpkg/drop | 17 | ||||
-rw-r--r-- | bpkg/package | 2 | ||||
-rw-r--r-- | bpkg/pkg-build | 17 | ||||
-rw-r--r-- | bpkg/pkg-build-options.cli (renamed from bpkg/build-options.cli) | 18 | ||||
-rw-r--r-- | bpkg/pkg-build.cxx (renamed from bpkg/build.cxx) | 14 | ||||
-rw-r--r-- | bpkg/pkg-drop | 17 | ||||
-rw-r--r-- | bpkg/pkg-drop-options.cli (renamed from bpkg/drop-options.cli) | 14 | ||||
-rw-r--r-- | bpkg/pkg-drop.cxx (renamed from bpkg/drop.cxx) | 10 | ||||
-rw-r--r-- | bpkg/pkg-fetch.cxx | 4 | ||||
-rw-r--r-- | bpkg/rep-add | 17 | ||||
-rw-r--r-- | bpkg/rep-fetch | 17 | ||||
-rwxr-xr-x | tests/test.sh | 398 |
23 files changed, 379 insertions, 391 deletions
diff --git a/bpkg/bpkg-options.cli b/bpkg/bpkg-options.cli index cfdf9d9..8cd4f9c 100644 --- a/bpkg/bpkg-options.cli +++ b/bpkg/bpkg-options.cli @@ -39,101 +39,101 @@ namespace bpkg "" } - bool build + bool cfg-create|create { - "<pkg>...", - "Build one or more packages \- \l{bpkg-build-options(1)}.", + "<dir>", + "Create configuration.", "" } - bool drop + bool cfg-add|add { - "<pkg>...", - "Drop one or more packages.", + "<rep>", + "Add repository to configuration.", "" } - bool pkg-verify + bool cfg-fetch|fetch { - "<archive>", - "Verify archive is a valid package.", + "", + "Fetch list of available packages.", "" } - bool pkg-status + bool pkg-status|status { - "<pkg>", // [/<ver>]: 24 + "<pkg>", "Print package status.", "" } - bool pkg-fetch + bool pkg-build|build { - "<pkg>/<ver>", - "Fetch package archive.", + "<pkg>", + "Build package(s) \- \l{bpkg-pkg-build(1)}.", "" } - bool pkg-unpack + bool pkg-drop|drop { "<pkg>", - "Unpack package archive.", + "Drop package(s).", "" } - bool pkg-purge + bool pkg-update|update { "<pkg>", - "Purge package.", + "Update package.", "" } - bool pkg-configure + bool pkg-clean|clean { "<pkg>", - "Configure package.", + "Clean package.", "" } - bool pkg-disfigure + bool pkg-verify { - "<pkg>", - "Disfigure package.", + "<archive>", + "Verify archive is a valid package.", "" } - bool pkg-update + bool pkg-fetch { - "<pkg>", - "Update package.", + "<pkg>/<ver>", + "Fetch package archive.", "" } - bool pkg-clean + bool pkg-unpack { "<pkg>", - "Clean package.", + "Unpack package archive.", "" } - bool cfg-create + bool pkg-configure { - "[<conf>]", - "Create configuration.", + "<pkg>", + "Configure package.", "" } - bool rep-add + bool pkg-disfigure { - "<rep>", - "Add repository to configuration.", + "<pkg>", + "Disfigure package.", "" } - bool rep-fetch + bool pkg-purge { - "", - "Fetch available packages list.", + "<pkg>", + "Purge package.", "" } @@ -147,7 +147,7 @@ namespace bpkg bool rep-create { "[<dir>]", - "Create repository manifest file.", + "Generate repository packages manifest.", "" } }; @@ -160,7 +160,7 @@ namespace bpkg bool common-options { - "Options common for all commands \- \l{bpkg-common-options(1)}." + "Details on common options \- \l{bpkg-common-options(1)}." } }; diff --git a/bpkg/bpkg.cxx b/bpkg/bpkg.cxx index 2f483c3..6b2ef85 100644 --- a/bpkg/bpkg.cxx +++ b/bpkg/bpkg.cxx @@ -16,9 +16,8 @@ // #include <bpkg/help> -#include <bpkg/build> -#include <bpkg/drop> - +#include <bpkg/pkg-build> +#include <bpkg/pkg-drop> #include <bpkg/pkg-verify> #include <bpkg/pkg-status> #include <bpkg/pkg-fetch> @@ -29,10 +28,10 @@ #include <bpkg/pkg-update> #include <bpkg/pkg-clean> +#include <bpkg/cfg-add> #include <bpkg/cfg-create> +#include <bpkg/cfg-fetch> -#include <bpkg/rep-add> -#include <bpkg/rep-fetch> #include <bpkg/rep-info> #include <bpkg/rep-create> @@ -172,17 +171,12 @@ try break; \ } - // High-level commands. - // -#define COMMAND(CMD) COMMAND_IMPL(, "", CMD) - - COMMAND(build); - COMMAND(drop); - // pkg-* commands // #define PKG_COMMAND(CMD) COMMAND_IMPL(pkg_, "pkg-", CMD) + PKG_COMMAND (build); + PKG_COMMAND (drop); PKG_COMMAND (verify); PKG_COMMAND (status); PKG_COMMAND (fetch); @@ -197,14 +191,14 @@ try // #define CFG_COMMAND(CMD) COMMAND_IMPL(cfg_, "cfg-", CMD) + CFG_COMMAND (add); CFG_COMMAND (create); + CFG_COMMAND (fetch); // rep-* commands // #define REP_COMMAND(CMD) COMMAND_IMPL(rep_, "rep-", CMD) - REP_COMMAND (add); - REP_COMMAND (fetch); REP_COMMAND (info); REP_COMMAND (create); diff --git a/bpkg/build b/bpkg/build deleted file mode 100644 index a5c047d..0000000 --- a/bpkg/build +++ /dev/null @@ -1,17 +0,0 @@ -// file : bpkg/build -*- C++ -*- -// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -#ifndef BPKG_BUILD -#define BPKG_BUILD - -#include <bpkg/types> -#include <bpkg/build-options> - -namespace bpkg -{ - int - build (const build_options&, cli::scanner& args); -} - -#endif // BPKG_BUILD diff --git a/bpkg/buildfile b/bpkg/buildfile index 2e49f17..580f303 100644 --- a/bpkg/buildfile +++ b/bpkg/buildfile @@ -10,20 +10,22 @@ import libs += libodb-sqlite%lib{odb-sqlite} exe{bpkg}: \ {hxx }{ bpkg-version } \ { cxx}{ bpkg } {hxx ixx cxx}{ bpkg-options } \ -{hxx cxx}{ build } {hxx ixx cxx}{ build-options } \ +{hxx cxx}{ cfg-add } {hxx ixx cxx}{ cfg-add-options } \ {hxx cxx}{ cfg-create } {hxx ixx cxx}{ cfg-create-options } \ +{hxx cxx}{ cfg-fetch } {hxx ixx cxx}{ cfg-fetch-options } \ {hxx ixx cxx}{ common-options } \ {hxx ixx cxx}{ configuration-options } \ {hxx cxx}{ database } \ {hxx cxx}{ diagnostics } \ -{hxx cxx}{ drop } {hxx ixx cxx}{ drop-options } \ {hxx cxx}{ fetch } \ {hxx }{ forward } \ {hxx cxx}{ help } {hxx ixx cxx}{ help-options } \ {hxx cxx}{ manifest-utility } \ {hxx ixx cxx}{ package } \ {hxx ixx cxx}{ package-odb } file{ package.xml } \ +{hxx cxx}{ pkg-build } {hxx ixx cxx}{ pkg-build-options } \ {hxx }{ pkg-clean } {hxx ixx cxx}{ pkg-clean-options } \ +{hxx cxx}{ pkg-drop } {hxx ixx cxx}{ pkg-drop-options } \ {hxx cxx}{ pkg-command } \ {hxx cxx}{ pkg-configure } {hxx ixx cxx}{ pkg-configure-options } \ {hxx cxx}{ pkg-disfigure } {hxx ixx cxx}{ pkg-disfigure-options } \ @@ -33,9 +35,7 @@ exe{bpkg}: \ {hxx cxx}{ pkg-unpack } {hxx ixx cxx}{ pkg-unpack-options } \ {hxx }{ pkg-update } {hxx ixx cxx}{ pkg-update-options } \ {hxx cxx}{ pkg-verify } {hxx ixx cxx}{ pkg-verify-options } \ -{hxx cxx}{ rep-add } {hxx ixx cxx}{ rep-add-options } \ {hxx cxx}{ rep-create } {hxx ixx cxx}{ rep-create-options } \ -{hxx cxx}{ rep-fetch } {hxx ixx cxx}{ rep-fetch-options } \ {hxx cxx}{ rep-info } {hxx ixx cxx}{ rep-info-options } \ {hxx cxx}{ satisfaction } \ {hxx }{ types } \ @@ -62,14 +62,14 @@ if! $cli.loaded {hxx ixx cxx}{configuration-options}: cli{configuration-options} {hxx ixx cxx}{bpkg-options}: cli{bpkg-options} -# High-level commands. +# Help command. # {hxx ixx cxx}{help-options}: cli{help-options} -{hxx ixx cxx}{build-options}: cli{build-options} -{hxx ixx cxx}{drop-options}: cli{drop-options} # pkg-* command. # +{hxx ixx cxx}{pkg-build-options}: cli{pkg-build-options} +{hxx ixx cxx}{pkg-drop-options}: cli{pkg-drop-options} {hxx ixx cxx}{pkg-status-options}: cli{pkg-status-options} {hxx ixx cxx}{pkg-fetch-options}: cli{pkg-fetch-options} {hxx ixx cxx}{pkg-unpack-options}: cli{pkg-unpack-options} @@ -86,8 +86,8 @@ if! $cli.loaded # rep-* command. # -{hxx ixx cxx}{rep-add-options}: cli{rep-add-options} -{hxx ixx cxx}{rep-fetch-options}: cli{rep-fetch-options} +{hxx ixx cxx}{cfg-add-options}: cli{cfg-add-options} +{hxx ixx cxx}{cfg-fetch-options}: cli{cfg-fetch-options} {hxx ixx cxx}{rep-info-options}: cli{rep-info-options} {hxx ixx cxx}{rep-create-options}: cli{rep-create-options} @@ -97,7 +97,7 @@ cli.options += -I $src_root --include-with-brackets --include-prefix bpkg \ --guard-prefix BPKG --cxx-prologue "#include <bpkg/types-parsers>" \ --cli-namespace bpkg::cli --generate-file-scanner --generate-specifier \ --generate-parse --ansi-color --page-usage 'bpkg::print_$name$_' \ ---include-base-last --long-usage --option-length 20 +--include-base-last --long-usage --option-length 22 cli.cxx{common-options}: cli.options += --short-usage # Both short and long. cli.cxx{bpkg-options}: cli.options += --suppress-undocumented # --help, etc. diff --git a/bpkg/cfg-add b/bpkg/cfg-add new file mode 100644 index 0000000..9f8ddeb --- /dev/null +++ b/bpkg/cfg-add @@ -0,0 +1,17 @@ +// file : bpkg/cfg-add -*- C++ -*- +// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +#ifndef BPKG_CFG_ADD +#define BPKG_CFG_ADD + +#include <bpkg/types> +#include <bpkg/cfg-add-options> + +namespace bpkg +{ + int + cfg_add (const cfg_add_options&, cli::scanner& args); +} + +#endif // BPKG_CFG_ADD diff --git a/bpkg/rep-add-options.cli b/bpkg/cfg-add-options.cli index e9abf51..185fcfd 100644 --- a/bpkg/rep-add-options.cli +++ b/bpkg/cfg-add-options.cli @@ -1,30 +1,30 @@ -// file : bpkg/rep-add-options.cli +// file : bpkg/cfg-add-options.cli // copyright : Copyright (c) 2014-2015 Code Synthesis Ltd // license : MIT; see accompanying LICENSE file include <bpkg/configuration-options.cli>; "\section=1" -"\name=bpkg-rep-add" +"\name=bpkg-cfg-add" "\summary=add repository to configuration" /* "\h{SYNOPSIS} -bpkg rep-add [<options>] <rep>" +bpkg cfg-add [<options>] <rep>" "\h{DESCRIPTION} -The \cb{rep-add} command adds the specified source repository to the +The \cb{cfg-add} command adds the specified source repository to the configuration. Note that this command doesn't fetch the available packages list for the newly added repository. To do that, use the -\cb{rep-fetch} command. +\cb{cfg-fetch} command. " */ namespace bpkg { - class rep_add_options: configuration_options + class cfg_add_options: configuration_options { }; } diff --git a/bpkg/rep-add.cxx b/bpkg/cfg-add.cxx index 0c06ce6..33c4ba5 100644 --- a/bpkg/rep-add.cxx +++ b/bpkg/cfg-add.cxx @@ -1,8 +1,8 @@ -// file : bpkg/rep-add.cxx -*- C++ -*- +// file : bpkg/cfg-add.cxx -*- C++ -*- // copyright : Copyright (c) 2014-2015 Code Synthesis Ltd // license : MIT; see accompanying LICENSE file -#include <bpkg/rep-add> +#include <bpkg/cfg-add> #include <stdexcept> // invalid_argument @@ -20,16 +20,16 @@ using namespace butl; namespace bpkg { int - rep_add (const rep_add_options& o, cli::scanner& args) + cfg_add (const cfg_add_options& o, cli::scanner& args) { - tracer trace ("rep_add"); + tracer trace ("cfg_add"); dir_path c (o.directory ()); level4 ([&]{trace << "configuration: " << c;}); if (!args.more ()) fail << "repository location argument expected" << - info << "run 'bpkg help rep-add' for more information"; + info << "run 'bpkg help cfg-add' for more information"; repository_location rl (parse_location (args.next ())); const string& rn (rl.canonical_name ()); diff --git a/bpkg/cfg-fetch b/bpkg/cfg-fetch new file mode 100644 index 0000000..d311c24 --- /dev/null +++ b/bpkg/cfg-fetch @@ -0,0 +1,17 @@ +// file : bpkg/cfg-fetch -*- C++ -*- +// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +#ifndef BPKG_CFG_FETCH +#define BPKG_CFG_FETCH + +#include <bpkg/types> +#include <bpkg/cfg-fetch-options> + +namespace bpkg +{ + int + cfg_fetch (const cfg_fetch_options&, cli::scanner& args); +} + +#endif // BPKG_CFG_FETCH diff --git a/bpkg/rep-fetch-options.cli b/bpkg/cfg-fetch-options.cli index 8cb9ddb..696627f 100644 --- a/bpkg/rep-fetch-options.cli +++ b/bpkg/cfg-fetch-options.cli @@ -1,28 +1,28 @@ -// file : bpkg/rep-fetch-options.cli +// file : bpkg/cfg-fetch-options.cli // copyright : Copyright (c) 2014-2015 Code Synthesis Ltd // license : MIT; see accompanying LICENSE file include <bpkg/configuration-options.cli>; "\section=1" -"\name=bpkg-rep-fetch" +"\name=bpkg-cfg-fetch" "\summary=fetch available packages list" /* "\h{SYNOPSIS} -bpkg rep-fetch [<options>]" +bpkg cfg-fetch [<options>]" "\h{DESCRIPTION} -The \cb{rep-fetch} command recursively fetches the prerequisite repository +The \cb{cfg-fetch} command recursively fetches the prerequisite repository and available package lists for all the repositories that were added -(\cb{rep-add}) to the configuration." +(\cb{cfg-add}) to the configuration." */ namespace bpkg { - class rep_fetch_options: configuration_options + class cfg_fetch_options: configuration_options { }; } diff --git a/bpkg/rep-fetch.cxx b/bpkg/cfg-fetch.cxx index 1136e98..f765678 100644 --- a/bpkg/rep-fetch.cxx +++ b/bpkg/cfg-fetch.cxx @@ -1,8 +1,8 @@ -// file : bpkg/rep-fetch.cxx -*- C++ -*- +// file : bpkg/cfg-fetch.cxx -*- C++ -*- // copyright : Copyright (c) 2014-2015 Code Synthesis Ltd // license : MIT; see accompanying LICENSE file -#include <bpkg/rep-fetch> +#include <bpkg/cfg-fetch> #include <fstream> #include <stdexcept> @@ -23,11 +23,11 @@ using namespace butl; namespace bpkg { static void - rep_fetch (const common_options& co, + cfg_fetch (const common_options& co, transaction& t, const shared_ptr<repository>& r) { - tracer trace ("rep_fetch(rep)"); + tracer trace ("cfg_fetch(rep)"); database& db (t.database ()); tracer_guard tg (db, trace); @@ -89,7 +89,7 @@ namespace bpkg // (or is already being) fetched. // if (!pr->fetched) - rep_fetch (co, t, pr); + cfg_fetch (co, t, pr); // @@ What if we have duplicated? Ideally, we would like to check // this once and as early as possible. The original idea was to @@ -176,9 +176,9 @@ namespace bpkg } int - rep_fetch (const rep_fetch_options& o, cli::scanner&) + cfg_fetch (const cfg_fetch_options& o, cli::scanner&) { - tracer trace ("rep_fetch"); + tracer trace ("cfg_fetch"); dir_path c (o.directory ()); level4 ([&]{trace << "configuration: " << c;}); @@ -192,7 +192,7 @@ namespace bpkg if (ua.empty ()) fail << "configuration " << c << " has no repositories" << - info << "use 'bpkg rep-add' to add a repository"; + info << "use 'bpkg cfg-add' to add a repository"; // Clean repositories and available packages. At the end only // repositories that were explicitly added by the user and the @@ -226,7 +226,7 @@ namespace bpkg // their packages. // for (const lazy_shared_ptr<repository>& lp: ua) - rep_fetch (o, t, lp.load ()); + cfg_fetch (o, t, lp.load ()); size_t rcount, pcount; if (verb) diff --git a/bpkg/common-options.cli b/bpkg/common-options.cli index 02cc605..86955d7 100644 --- a/bpkg/common-options.cli +++ b/bpkg/common-options.cli @@ -93,7 +93,7 @@ namespace bpkg path --fetch { "<path>", - "The fetch program to be used to download remote resources. Currently, + "The fetch program to be used to download resources. Currently, \cb{bpkg} recognizes \cb{curl}, \cb{wget}, and \cb{fetch}. Note that the last component of <path> must contain one of these names as a substring in order for \cb{bpkg} to recognize which program is being diff --git a/bpkg/drop b/bpkg/drop deleted file mode 100644 index 0054045..0000000 --- a/bpkg/drop +++ /dev/null @@ -1,17 +0,0 @@ -// file : bpkg/drop -*- C++ -*- -// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -#ifndef BPKG_DROP -#define BPKG_DROP - -#include <bpkg/types> -#include <bpkg/drop-options> - -namespace bpkg -{ - int - drop (const drop_options&, cli::scanner& args); -} - -#endif // BPKG_DROP diff --git a/bpkg/package b/bpkg/package index 4269605..f07a2c1 100644 --- a/bpkg/package +++ b/bpkg/package @@ -370,7 +370,7 @@ namespace bpkg // Repository from which this package came. Note that it is not // a pointer to the repository object because it could be wiped - // out (e.g., as a result of rep-fetch). We call such packages + // out (e.g., as a result of cfg-fetch). We call such packages // "orphans". While we can get a list of orphan's prerequisites // (by loading its manifest), we wouldn't know which repository // to use as a base to resolve them. As a result, an orphan that diff --git a/bpkg/pkg-build b/bpkg/pkg-build new file mode 100644 index 0000000..562321f --- /dev/null +++ b/bpkg/pkg-build @@ -0,0 +1,17 @@ +// file : bpkg/pkg-build -*- C++ -*- +// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +#ifndef BPKG_PKG_BUILD +#define BPKG_PKG_BUILD + +#include <bpkg/types> +#include <bpkg/pkg-build-options> + +namespace bpkg +{ + int + pkg_build (const pkg_build_options&, cli::scanner& args); +} + +#endif // BPKG_PKG_BUILD diff --git a/bpkg/build-options.cli b/bpkg/pkg-build-options.cli index 77cfd72..ceeef65 100644 --- a/bpkg/build-options.cli +++ b/bpkg/pkg-build-options.cli @@ -1,11 +1,11 @@ -// file : bpkg/build-options.cli +// file : bpkg/pkg-build-options.cli // copyright : Copyright (c) 2014-2015 Code Synthesis Ltd // license : MIT; see accompanying LICENSE file include <bpkg/configuration-options.cli>; "\section=1" -"\name=bpkg-build" +"\name=bpkg-pkg-build" "\summary=build one or more packages" namespace bpkg @@ -15,15 +15,15 @@ namespace bpkg "\h|SYNOPSIS| - \c{\b{bpkg build} [<options>] (<pkg>[/<ver>] | <file> | <dir>)...} + \c{\b{bpkg pkg-build} [<options>] (<pkg>[/<ver>] | <file> | <dir>)...} \h|DESCRIPTION| - The \cb{build} command builds one or more packages including all their + The \cb{pkg-build} command builds one or more packages including all their prerequisites. Each package can be specified as just the name (<pkg>) with optional package version (<ver>) in which case the package will be automatically fetched from one of the configuration's source repositories - (see the \cb{rep-add} and \cb{rep-fetch} commands). Alternatively, the + (see the \cb{cfg-add} and \cb{cfg-fetch} commands). Alternatively, the package can be specified as either the path to the package source archive (<file>) or package source directory (<dir>). See the \cb{pkg-fetch} and \cb{pkg-unpack} commands for more information on the semantics of @@ -36,13 +36,13 @@ namespace bpkg addition, have their versions held, that is, they will not be automatically upgraded. - The \cb{build} command also supports several \cb{--*-only} options that - allow you to limit the amount of work that will be done." + The \cb{pkg-build} command also supports several \cb{--*-only} options + that allow you to limit the amount of work that will be done." } - class build_options: configuration_options + class pkg_build_options: configuration_options { - "\h|BUILD OPTIONS|" + "\h|PKG-BUILD OPTIONS|" bool --yes|-y { diff --git a/bpkg/build.cxx b/bpkg/pkg-build.cxx index 3cb96f4..cb108eb 100644 --- a/bpkg/build.cxx +++ b/bpkg/pkg-build.cxx @@ -1,8 +1,8 @@ -// file : bpkg/build.cxx -*- C++ -*- +// file : bpkg/pkg-build.cxx -*- C++ -*- // copyright : Copyright (c) 2014-2015 Code Synthesis Ltd // license : MIT; see accompanying LICENSE file -#include <bpkg/build> +#include <bpkg/pkg-build> #include <map> #include <list> @@ -717,16 +717,16 @@ namespace bpkg }; int - build (const build_options& o, cli::scanner& args) + pkg_build (const pkg_build_options& o, cli::scanner& args) { - tracer trace ("build"); + tracer trace ("pkg_build"); const dir_path& c (o.directory ()); level4 ([&]{trace << "configuration: " << c;}); if (!args.more ()) fail << "package name argument expected" << - info << "run 'bpkg help build' for more information"; + info << "run 'bpkg help pkg-build' for more information"; database db (open (c, trace)); @@ -908,10 +908,10 @@ namespace bpkg // if (db.query_value<repository_count> () == 0) dr << info << "configuration " << c << " has no repositories" - << info << "use 'bpkg rep-add' to add a repository"; + << info << "use 'bpkg cfg-add' to add a repository"; else if (db.query_value<available_package_count> () == 0) dr << info << "configuration " << c << " has no available packages" - << info << "use 'bpkg rep-fetch' to fetch available packages " + << info << "use 'bpkg cfg-fetch' to fetch available packages " << "list"; } diff --git a/bpkg/pkg-drop b/bpkg/pkg-drop new file mode 100644 index 0000000..cb70ed0 --- /dev/null +++ b/bpkg/pkg-drop @@ -0,0 +1,17 @@ +// file : bpkg/pkg-drop -*- C++ -*- +// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +#ifndef BPKG_PKG_DROP +#define BPKG_PKG_DROP + +#include <bpkg/types> +#include <bpkg/pkg-drop-options> + +namespace bpkg +{ + int + pkg_drop (const pkg_drop_options&, cli::scanner& args); +} + +#endif // BPKG_PKG_DROP diff --git a/bpkg/drop-options.cli b/bpkg/pkg-drop-options.cli index 6901398..6409ee8 100644 --- a/bpkg/drop-options.cli +++ b/bpkg/pkg-drop-options.cli @@ -1,33 +1,33 @@ -// file : bpkg/drop-options.cli +// file : bpkg/pkg-drop-options.cli // copyright : Copyright (c) 2014-2015 Code Synthesis Ltd // license : MIT; see accompanying LICENSE file include <bpkg/configuration-options.cli>; "\section=1" -"\name=bpkg-drop" +"\name=bpkg-pkg-drop" "\summary=drop one or more packages" /* "\h{SYNOPSIS} -bpkg drop [<options>] <pkg>..." +bpkg pkg-drop [<options>] <pkg>..." "\h{DESCRIPTION} -The \cb{drop} command drops one or more packages from the configuration. +The \cb{pkg-drop} command drops one or more packages from the configuration. If the packages being dropped still have dependents, then those will have to be drop as well and you will be prompted for a confirmation. Similarly, if the packages being dropped have prerequisites that are no longer needed, you will be offered to drop those as well. -The \cb{drop} command also supports several \cb{--*-only} options that allow -you to limit the amount of work that will be done. +The \cb{pkg-drop} command also supports several \cb{--*-only} options that +allow you to limit the amount of work that will be done. */ namespace bpkg { - class drop_options: configuration_options + class pkg_drop_options: configuration_options { bool --yes|-y { diff --git a/bpkg/drop.cxx b/bpkg/pkg-drop.cxx index 87c475d..f7d897d 100644 --- a/bpkg/drop.cxx +++ b/bpkg/pkg-drop.cxx @@ -1,8 +1,8 @@ -// file : bpkg/drop.cxx -*- C++ -*- +// file : bpkg/pkg-drop.cxx -*- C++ -*- // copyright : Copyright (c) 2014-2015 Code Synthesis Ltd // license : MIT; see accompanying LICENSE file -#include <bpkg/drop> +#include <bpkg/pkg-drop> #include <map> #include <list> @@ -293,9 +293,9 @@ namespace bpkg }; int - drop (const drop_options& o, cli::scanner& args) + pkg_drop (const pkg_drop_options& o, cli::scanner& args) { - tracer trace ("drop"); + tracer trace ("pkg_drop"); if (o.yes () && o.no ()) fail << "both --yes|-y and --no|-n specified"; @@ -305,7 +305,7 @@ namespace bpkg if (!args.more ()) fail << "package name argument expected" << - info << "run 'bpkg help drop' for more information"; + info << "run 'bpkg help pkg-drop' for more information"; database db (open (c, trace)); diff --git a/bpkg/pkg-fetch.cxx b/bpkg/pkg-fetch.cxx index 1718c5b..8926a9d 100644 --- a/bpkg/pkg-fetch.cxx +++ b/bpkg/pkg-fetch.cxx @@ -180,11 +180,11 @@ namespace bpkg if (db.query_value<repository_count> () == 0) fail << "configuration " << c << " has no repositories" << - info << "use 'bpkg rep-add' to add a repository"; + info << "use 'bpkg cfg-add' to add a repository"; if (db.query_value<available_package_count> () == 0) fail << "configuration " << c << " has no available packages" << - info << "use 'bpkg rep-fetch' to fetch available packages list"; + info << "use 'bpkg cfg-fetch' to fetch available packages list"; shared_ptr<available_package> ap ( db.find<available_package> (available_package_id (n, v))); diff --git a/bpkg/rep-add b/bpkg/rep-add deleted file mode 100644 index 10d85f4..0000000 --- a/bpkg/rep-add +++ /dev/null @@ -1,17 +0,0 @@ -// file : bpkg/rep-add -*- C++ -*- -// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -#ifndef BPKG_REP_ADD -#define BPKG_REP_ADD - -#include <bpkg/types> -#include <bpkg/rep-add-options> - -namespace bpkg -{ - int - rep_add (const rep_add_options&, cli::scanner& args); -} - -#endif // BPKG_REP_ADD diff --git a/bpkg/rep-fetch b/bpkg/rep-fetch deleted file mode 100644 index 9175755..0000000 --- a/bpkg/rep-fetch +++ /dev/null @@ -1,17 +0,0 @@ -// file : bpkg/rep-fetch -*- C++ -*- -// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -#ifndef BPKG_REP_FETCH -#define BPKG_REP_FETCH - -#include <bpkg/types> -#include <bpkg/rep-fetch-options> - -namespace bpkg -{ - int - rep_fetch (const rep_fetch_options&, cli::scanner& args); -} - -#endif // BPKG_REP_FETCH diff --git a/tests/test.sh b/tests/test.sh index e3c613c..2473bf3 100755 --- a/tests/test.sh +++ b/tests/test.sh @@ -236,58 +236,58 @@ stat libfoo unknown ## -## rep-add +## cfg-add ## test cfg-create --wipe -fail rep-add # repository location expected -fail rep-add stable # invalid location -fail rep-add http:// # invalid location +fail cfg-add # repository location expected +fail cfg-add stable # invalid location +fail cfg-add http:// # invalid location # relative path # -test rep-add ./1/bar/stable -fail rep-add ./1/../1/bar/stable # duplicate +test cfg-add ./1/bar/stable +fail cfg-add ./1/../1/bar/stable # duplicate # absolute path # -test rep-add /tmp/1/foo/stable -fail rep-add /tmp/1/../1/foo/stable # duplicate +test cfg-add /tmp/1/foo/stable +fail cfg-add /tmp/1/../1/foo/stable # duplicate # remote URL # -test rep-add http://pkg.example.org/1/testing -fail rep-add http://www.example.org/1/testing # duplicate +test cfg-add http://pkg.example.org/1/testing +fail cfg-add http://www.example.org/1/testing # duplicate ## -## rep-fetch +## cfg-fetch ## test cfg-create --wipe -fail rep-fetch # no repositories +fail cfg-fetch # no repositories # hello repository # test cfg-create --wipe -test rep-add $rep/common/hello -test rep-fetch -test rep-fetch +test cfg-add $rep/common/hello +test cfg-fetch +test cfg-fetch # bar/unstable repository # test cfg-create --wipe -test rep-add $rep/common/bar/unstable -test rep-fetch -test rep-fetch +test cfg-add $rep/common/bar/unstable +test cfg-fetch +test cfg-fetch # both # test cfg-create --wipe -test rep-add $rep/common/hello -test rep-add $rep/common/bar/unstable -test rep-fetch -test rep-fetch +test cfg-add $rep/common/hello +test cfg-add $rep/common/bar/unstable +test cfg-fetch +test cfg-fetch ## @@ -304,14 +304,14 @@ fail pkg-fetch libfoo # package version expected fail pkg-fetch libfoo/1/2/3 # invalid package version fail pkg-fetch libfoo/1.0.0 # no repositories -test rep-add $rep/fetch/t1 +test cfg-add $rep/fetch/t1 fail pkg-fetch libfoo/1.0.0 # no packages -test rep-fetch +test cfg-fetch fail pkg-fetch libfoo/2+1.0.0 # not available test cfg-create --wipe -test rep-add $rep/fetch/t1 -test rep-fetch +test cfg-add $rep/fetch/t1 +test cfg-fetch test pkg-fetch libfoo/1.0.0 stat libfoo/1.0.0 fetched fail pkg-fetch libfoo/1.0.0 @@ -334,8 +334,8 @@ test pkg-purge libfoo # hello # test cfg-create --wipe -test rep-add $rep/common/hello -test rep-fetch +test cfg-add $rep/common/hello +test cfg-fetch test pkg-fetch libhello/1.0.0 test pkg-purge libhello @@ -348,8 +348,8 @@ fail pkg-unpack -r # replace only with existing fail pkg-unpack -e # package directory expected fail pkg-unpack # package name expected -test rep-add $rep/fetch/t1 -test rep-fetch +test cfg-add $rep/fetch/t1 +test cfg-fetch # existing # @@ -391,8 +391,8 @@ test pkg-purge libfoo # hello # test cfg-create --wipe -test rep-add $rep/common/hello -test rep-fetch +test cfg-add $rep/common/hello +test cfg-fetch test pkg-fetch libhello/1.0.0 test pkg-unpack libhello test pkg-purge libhello @@ -499,8 +499,8 @@ stat libfoo unknown ## pkg-configure/pkg-disfigure ## test cfg-create --wipe -test rep-add $rep/common/hello -test rep-fetch +test cfg-add $rep/common/hello +test cfg-fetch fail pkg-configure # package name expected fail pkg-configure config.dist.root=/tmp # ditto @@ -589,8 +589,8 @@ stat libhello unknown # test rep-create repository/1/depend/stable test cfg-create --wipe -test rep-add $rep/depend/stable -test rep-fetch +test cfg-add $rep/depend/stable +test cfg-fetch test pkg-fetch libbar/1.0.0 test pkg-unpack libbar @@ -666,8 +666,8 @@ test rep-create repository/1/status/unstable test cfg-create --wipe stat libfoo/1.0.0 "unknown" stat libfoo "unknown" -test rep-add $rep/status/stable -test rep-fetch +test cfg-add $rep/status/stable +test cfg-fetch stat libfoo/1.0.0 "available" stat libfoo "available 1.0.0" test pkg-fetch libfoo/1.0.0 @@ -677,21 +677,21 @@ stat libfoo "fetched 1.0.0" # multiple versions/revisions # test cfg-create --wipe -test rep-add $rep/status/extra -test rep-fetch +test cfg-add $rep/status/extra +test cfg-fetch stat libbar "available 1.1.0-1" -test rep-add $rep/status/stable -test rep-fetch +test cfg-add $rep/status/stable +test cfg-fetch stat libbar "available 1.1.0-1 1.0.0" test cfg-create --wipe -test rep-add $rep/status/testing -test rep-fetch +test cfg-add $rep/status/testing +test cfg-fetch stat libbar "available 1.1.0 1.0.0-1 1.0.0" test cfg-create --wipe -test rep-add $rep/status/unstable -test rep-fetch +test cfg-add $rep/status/unstable +test cfg-fetch stat libbar "available 2.0.0 1.1.0 1.0.0-1 1.0.0" test pkg-fetch libbar/1.0.0-1 stat libbar "fetched 1.0.0-1; available 2.0.0 1.1.0" @@ -704,8 +704,8 @@ stat libbar "fetched 2.0.0" ## pkg-update ## test cfg-create --wipe -test rep-add $rep/common/hello -test rep-fetch +test cfg-add $rep/common/hello +test cfg-fetch fail pkg-update # package name expected fail pkg-update libhello # no such package @@ -738,8 +738,8 @@ test pkg-purge libhello ## pkg-clean ## test cfg-create --wipe -test rep-add $rep/common/hello -test rep-fetch +test cfg-add $rep/common/hello +test cfg-fetch fail pkg-clean # package name expected fail pkg-clean libhello # no such package @@ -778,8 +778,8 @@ test pkg-purge libhello # build and clean package # test cfg-create --wipe cxx -test rep-add $rep/common/hello -test rep-fetch +test cfg-add $rep/common/hello +test cfg-fetch test pkg-fetch libhello/1.0.0 test pkg-unpack libhello test pkg-configure libhello @@ -788,14 +788,8 @@ test pkg-clean libhello test pkg-disfigure libhello test pkg-purge libhello - -## -## High-level commands. -## - - ## -## build +## pkg-build ## # 1 (libfoo) @@ -803,47 +797,47 @@ test pkg-purge libhello test rep-create repository/1/satisfy/t1 test cfg-create --wipe -fail build -p # package name expected -fail build -p libfoo # unknown package -fail build -p libfoo/1.0.0 # unknown package -test build -p repository/1/satisfy/libfoo-1.1.0.tar.gz <<EOF +fail pkg-build -p # package name expected +fail pkg-build -p libfoo # unknown package +fail pkg-build -p libfoo/1.0.0 # unknown package +test pkg-build -p repository/1/satisfy/libfoo-1.1.0.tar.gz <<EOF build libfoo 1.1.0 EOF -test build -p repository/1/satisfy/libfoo-1.1.0 <<EOF +test pkg-build -p repository/1/satisfy/libfoo-1.1.0 <<EOF build libfoo 1.1.0 EOF test pkg-unpack -e repository/1/satisfy/libfoo-1.1.0 -test build -p libfoo <<< "build libfoo 1.1.0" -test build -p libfoo/1.1.0 <<< "build libfoo 1.1.0" -test build -p libfoo libfoo <<< "build libfoo 1.1.0" -test build -p libfoo libfoo/1.1.0 <<< "build libfoo 1.1.0" -test build -p libfoo/1.1.0 libfoo <<< "build libfoo 1.1.0" -test build -p libfoo/1.1.0 libfoo/1.1.0 <<< "build libfoo 1.1.0" -fail build -p libfoo/1.0.0 +test pkg-build -p libfoo <<< "build libfoo 1.1.0" +test pkg-build -p libfoo/1.1.0 <<< "build libfoo 1.1.0" +test pkg-build -p libfoo libfoo <<< "build libfoo 1.1.0" +test pkg-build -p libfoo libfoo/1.1.0 <<< "build libfoo 1.1.0" +test pkg-build -p libfoo/1.1.0 libfoo <<< "build libfoo 1.1.0" +test pkg-build -p libfoo/1.1.0 libfoo/1.1.0 <<< "build libfoo 1.1.0" +fail pkg-build -p libfoo/1.0.0 test pkg-purge libfoo -test rep-add $rep/satisfy/t1 -test rep-fetch -test build -p libfoo <<< "build libfoo 1.0.0" -test build -p libfoo/1.0.0 <<< "build libfoo 1.0.0" -test build -p libfoo libfoo <<< "build libfoo 1.0.0" -test build -p libfoo libfoo/1.0.0 <<< "build libfoo 1.0.0" -test build -p libfoo/1.0.0 libfoo <<< "build libfoo 1.0.0" -test build -p libfoo/1.0.0 libfoo/1.0.0 <<< "build libfoo 1.0.0" -fail build -p libfoo/1.1.0 +test cfg-add $rep/satisfy/t1 +test cfg-fetch +test pkg-build -p libfoo <<< "build libfoo 1.0.0" +test pkg-build -p libfoo/1.0.0 <<< "build libfoo 1.0.0" +test pkg-build -p libfoo libfoo <<< "build libfoo 1.0.0" +test pkg-build -p libfoo libfoo/1.0.0 <<< "build libfoo 1.0.0" +test pkg-build -p libfoo/1.0.0 libfoo <<< "build libfoo 1.0.0" +test pkg-build -p libfoo/1.0.0 libfoo/1.0.0 <<< "build libfoo 1.0.0" +fail pkg-build -p libfoo/1.1.0 test pkg-unpack -e repository/1/satisfy/libfoo-1.1.0 -test build -p libfoo <<< "build libfoo 1.1.0" -test build -p libfoo/1.0.0 <<< "downgrade libfoo 1.0.0" -fail build -p libfoo/0.0.0 +test pkg-build -p libfoo <<< "build libfoo 1.1.0" +test pkg-build -p libfoo/1.0.0 <<< "downgrade libfoo 1.0.0" +fail pkg-build -p libfoo/0.0.0 test pkg-purge libfoo test pkg-fetch -e repository/1/satisfy/libfoo-0.0.0.tar.gz test pkg-unpack libfoo -test build -p libfoo <<< "upgrade libfoo 1.0.0" -test build -p libfoo/0.0.0 <<< "build libfoo 0.0.0" -fail build -p libfoo/1.1.0 +test pkg-build -p libfoo <<< "upgrade libfoo 1.0.0" +test pkg-build -p libfoo/0.0.0 <<< "build libfoo 0.0.0" +fail pkg-build -p libfoo/1.1.0 test pkg-purge libfoo # 2 (libbar depends on libfoo) @@ -851,55 +845,55 @@ test pkg-purge libfoo test rep-create repository/1/satisfy/t2 test cfg-create --wipe -fail build repository/1/satisfy/libbar-1.0.0.tar.gz +fail pkg-build repository/1/satisfy/libbar-1.0.0.tar.gz -test rep-add $rep/satisfy/t2 -test rep-fetch +test cfg-add $rep/satisfy/t2 +test cfg-fetch -test build -p libbar <<EOF +test pkg-build -p libbar <<EOF build libfoo 1.0.0 build libbar 1.0.0 EOF -test build -p libbar libfoo <<EOF +test pkg-build -p libbar libfoo <<EOF build libfoo 1.0.0 build libbar 1.0.0 EOF -test build -p libbar libfoo/1.0.0 <<EOF +test pkg-build -p libbar libfoo/1.0.0 <<EOF build libfoo 1.0.0 build libbar 1.0.0 EOF -test build -p libbar libfoo libbar/1.0.0 <<EOF +test pkg-build -p libbar libfoo libbar/1.0.0 <<EOF build libfoo 1.0.0 build libbar 1.0.0 EOF -fail build -p libbar libfoo/1.1.0 +fail pkg-build -p libbar libfoo/1.1.0 test pkg-fetch -e repository/1/satisfy/libfoo-0.0.0.tar.gz test pkg-unpack libfoo -test build -p libbar <<EOF +test pkg-build -p libbar <<EOF build libfoo 0.0.0 build libbar 1.0.0 EOF -test build -p libbar libfoo <<EOF +test pkg-build -p libbar libfoo <<EOF upgrade libfoo 1.0.0 build libbar 1.0.0 EOF -test build -p libbar libfoo/0.0.0 <<EOF +test pkg-build -p libbar libfoo/0.0.0 <<EOF build libfoo 0.0.0 build libbar 1.0.0 EOF test pkg-purge libfoo test pkg-unpack -e repository/1/satisfy/libfoo-1.1.0 -test build -p libbar <<EOF +test pkg-build -p libbar <<EOF build libfoo 1.1.0 build libbar 1.0.0 EOF -test build -p libbar libfoo <<EOF +test pkg-build -p libbar libfoo <<EOF build libfoo 1.1.0 build libbar 1.0.0 EOF -test build -p libbar libfoo/1.0.0 <<EOF +test pkg-build -p libbar libfoo/1.0.0 <<EOF downgrade libfoo 1.0.0 build libbar 1.0.0 EOF @@ -909,84 +903,84 @@ test pkg-purge libfoo # test rep-create repository/1/satisfy/t3 test cfg-create --wipe -test rep-add $rep/satisfy/t3 -test rep-fetch +test cfg-add $rep/satisfy/t3 +test cfg-fetch # only in prerequisite repository # -fail build -p libfoo -fail build -p libbar -fail build -p libbaz libbar +fail pkg-build -p libfoo +fail pkg-build -p libbar +fail pkg-build -p libbaz libbar -test build -p libbaz <<EOF +test pkg-build -p libbaz <<EOF build libfoo 1.0.0 build libbar 1.0.0 build libbaz 1.0.0 EOF -test rep-add $rep/satisfy/t2 -test rep-fetch +test cfg-add $rep/satisfy/t2 +test cfg-fetch # order # -test build -p libfox libfoo <<EOF +test pkg-build -p libfox libfoo <<EOF build libfox 1.0.0 build libfoo 1.0.0 EOF -test build -p libfoo libfox <<EOF +test pkg-build -p libfoo libfox <<EOF build libfoo 1.0.0 build libfox 1.0.0 EOF -test build -p libbaz libfoo <<EOF +test pkg-build -p libbaz libfoo <<EOF build libfoo 1.0.0 build libbar 1.0.0 build libbaz 1.0.0 EOF -test build -p libfoo libbaz <<EOF +test pkg-build -p libfoo libbaz <<EOF build libfoo 1.0.0 build libbar 1.0.0 build libbaz 1.0.0 EOF -test build -p libbaz libfox <<EOF +test pkg-build -p libbaz libfox <<EOF build libfoo 1.0.0 build libbar 1.0.0 build libbaz 1.0.0 build libfox 1.0.0 EOF -test build -p libfox libbaz <<EOF +test pkg-build -p libfox libbaz <<EOF build libfox 1.0.0 build libfoo 1.0.0 build libbar 1.0.0 build libbaz 1.0.0 EOF -test build -p libfox libfoo libbaz <<EOF +test pkg-build -p libfox libfoo libbaz <<EOF build libfox 1.0.0 build libfoo 1.0.0 build libbar 1.0.0 build libbaz 1.0.0 EOF -test build -p libfox libbaz libfoo <<EOF +test pkg-build -p libfox libbaz libfoo <<EOF build libfox 1.0.0 build libfoo 1.0.0 build libbar 1.0.0 build libbaz 1.0.0 EOF -test build -p libfoo libfox libbaz <<EOF +test pkg-build -p libfoo libfox libbaz <<EOF build libfoo 1.0.0 build libfox 1.0.0 build libbar 1.0.0 build libbaz 1.0.0 EOF -test build -p libfoo libbaz libfox <<EOF +test pkg-build -p libfoo libbaz libfox <<EOF build libfoo 1.0.0 build libbar 1.0.0 build libbaz 1.0.0 @@ -995,27 +989,27 @@ EOF # this one is contradictory: baz before fox but fox before foo # -test build -p libbaz libfox libfoo <<EOF +test pkg-build -p libbaz libfox libfoo <<EOF build libfox 1.0.0 build libfoo 1.0.0 build libbar 1.0.0 build libbaz 1.0.0 EOF -test build -p libbaz libfoo libfox <<EOF +test pkg-build -p libbaz libfoo libfox <<EOF build libfoo 1.0.0 build libbar 1.0.0 build libbaz 1.0.0 build libfox 1.0.0 EOF -test build -p libbaz libfoo libbar <<EOF +test pkg-build -p libbaz libfoo libbar <<EOF build libfoo 1.0.0 build libbar 1.0.0 build libbaz 1.0.0 EOF -test build -p libbaz libbar libfoo <<EOF +test pkg-build -p libbaz libbar libfoo <<EOF build libfoo 1.0.0 build libbar 1.0.0 build libbaz 1.0.0 @@ -1029,29 +1023,29 @@ test rep-create repository/1/satisfy/t4c test rep-create repository/1/satisfy/t4d test cfg-create --wipe -test rep-add $rep/satisfy/t4c -test rep-fetch +test cfg-add $rep/satisfy/t4c +test cfg-fetch -test build -p libbaz <<EOF +test pkg-build -p libbaz <<EOF build libfoo 1.1.0 build libbar 1.1.0 build libbaz 1.1.0 EOF -test build -p libfoo libbaz <<EOF +test pkg-build -p libfoo libbaz <<EOF build libfoo 1.1.0 build libbar 1.1.0 build libbaz 1.1.0 EOF -fail build -p libfoo/1.0.0 libbaz -fail build -p libfoo/1.1.0 libbaz +fail pkg-build -p libfoo/1.0.0 libbaz +fail pkg-build -p libfoo/1.1.0 libbaz # upgrade warning # test pkg-fetch -e repository/1/satisfy/libfoo-0.0.0.tar.gz test pkg-unpack libfoo -test build -p libbaz <<EOF +test pkg-build -p libbaz <<EOF upgrade libfoo 1.1.0 build libbar 1.1.0 build libbaz 1.1.0 @@ -1062,10 +1056,10 @@ test pkg-purge libfoo # test pkg-fetch -e repository/1/satisfy/libfoo-1.2.0.tar.gz test pkg-unpack libfoo -fail build -p libbaz -test rep-add $rep/satisfy/t4a -test rep-fetch -test build -p libfoo/1.1.0 libbaz <<EOF +fail pkg-build -p libbaz +test cfg-add $rep/satisfy/t4a +test cfg-fetch +test pkg-build -p libfoo/1.1.0 libbaz <<EOF downgrade libfoo 1.1.0 build libbar 1.1.0 build libbaz 1.1.0 @@ -1080,9 +1074,9 @@ test pkg-configure libfoo test pkg-fetch libbar/1.1.0 test pkg-unpack libbar test pkg-configure libbar -fail build -p repository/1/satisfy/libfoo-1.2.0.tar.gz -fail build -p libfoo/1.0.0 -test build -p libfoo/1.1.0 <<< "build libfoo 1.1.0" +fail pkg-build -p repository/1/satisfy/libfoo-1.2.0.tar.gz +fail pkg-build -p libfoo/1.0.0 +test pkg-build -p libfoo/1.1.0 <<< "build libfoo 1.1.0" test pkg-disfigure libbar test pkg-disfigure libfoo test pkg-purge libbar @@ -1102,41 +1096,41 @@ test pkg-fetch -e repository/1/satisfy/libbaz-1.1.0.tar.gz test pkg-unpack libbaz test pkg-configure libbaz -test rep-add $rep/satisfy/t4a -test rep-add $rep/satisfy/t4b -test rep-fetch +test cfg-add $rep/satisfy/t4a +test cfg-add $rep/satisfy/t4b +test cfg-fetch -test build -p libbar <<EOF +test pkg-build -p libbar <<EOF upgrade libfoo 1.1.0 upgrade libbar 1.1.0 reconfigure libbaz EOF -test build -p libfoo <<EOF +test pkg-build -p libfoo <<EOF upgrade libfoo 1.1.0 reconfigure libbar reconfigure libbaz EOF -test build -p libfoo libbar/1.0.0 <<EOF +test pkg-build -p libfoo libbar/1.0.0 <<EOF upgrade libfoo 1.1.0 reconfigure/build libbar 1.0.0 reconfigure libbaz EOF -test build -p libbar/1.0.0 libfoo <<EOF +test pkg-build -p libbar/1.0.0 libfoo <<EOF upgrade libfoo 1.1.0 reconfigure/build libbar 1.0.0 reconfigure libbaz EOF -test build -p libbaz libfoo <<EOF +test pkg-build -p libbaz libfoo <<EOF upgrade libfoo 1.1.0 reconfigure libbar reconfigure/build libbaz 1.1.0 EOF -test build -p libbaz libfoo/1.0.0 <<EOF +test pkg-build -p libbaz libfoo/1.0.0 <<EOF build libfoo 1.0.0 build libbaz 1.1.0 EOF @@ -1144,9 +1138,9 @@ EOF # actually build # test cfg-create --wipe -test rep-add $rep/satisfy/t4c -test rep-fetch -test build -y libbaz +test cfg-add $rep/satisfy/t4c +test cfg-fetch +test pkg-build -y libbaz stat libfoo/1.1.0 "configured" stat libbar/1.1.0 "configured" stat libbaz/1.1.0 "configured hold_package" @@ -1154,23 +1148,23 @@ stat libbaz/1.1.0 "configured hold_package" # hold # test cfg-create --wipe -test build -y repository/1/satisfy/libfoo-1.0.0.tar.gz +test pkg-build -y repository/1/satisfy/libfoo-1.0.0.tar.gz stat libfoo "configured 1.0.0 hold_package hold_version" -test build -y repository/1/satisfy/libfoo-1.1.0 +test pkg-build -y repository/1/satisfy/libfoo-1.1.0 stat libfoo "configured 1.1.0 hold_package hold_version" test cfg-create --wipe -test rep-add $rep/satisfy/t4c -test rep-fetch -test build -y libfoo +test cfg-add $rep/satisfy/t4c +test cfg-fetch +test pkg-build -y libfoo stat libfoo "configured 1.0.0 hold_package" -test build -y libfoo/1.0.0 +test pkg-build -y libfoo/1.0.0 stat libfoo "configured 1.0.0 hold_package hold_version" test cfg-create --wipe -test rep-add $rep/satisfy/t4c -test rep-fetch -test build -y libfoo/1.0.0 +test cfg-add $rep/satisfy/t4c +test cfg-fetch +test pkg-build -y libfoo/1.0.0 stat libfoo "configured 1.0.0 hold_package hold_version" test cfg-create --wipe @@ -1178,46 +1172,46 @@ test pkg-fetch -e repository/1/satisfy/libfoo-1.0.0.tar.gz test pkg-unpack libfoo test pkg-configure libfoo stat libfoo "configured 1.0.0" -test build -y libfoo +test pkg-build -y libfoo stat libfoo "configured 1.0.0 hold_package" test cfg-create --wipe -test rep-add $rep/satisfy/t4c -test rep-fetch -test build -y libfoo +test cfg-add $rep/satisfy/t4c +test cfg-fetch +test pkg-build -y libfoo stat libfoo "configured 1.0.0 hold_package" -test build -y libbaz +test pkg-build -y libbaz stat libfoo "configured 1.1.0 hold_package" test cfg-create --wipe -test rep-add $rep/satisfy/t4c -test rep-fetch -test build -y libfoo/1.0.0 +test cfg-add $rep/satisfy/t4c +test cfg-fetch +test pkg-build -y libfoo/1.0.0 stat libfoo "configured 1.0.0 hold_package hold_version" -fail build -y libbaz +fail pkg-build -y libbaz test cfg-create --wipe -test rep-add $rep/satisfy/t4c -test rep-fetch -test build -y libbaz +test cfg-add $rep/satisfy/t4c +test cfg-fetch +test pkg-build -y libbaz stat libfoo "configured 1.1.0" ## -## drop +## pkg-drop ## test cfg-create --wipe -fail drop -p # package name expected -fail drop -p libfoo # unknown package -fail drop -p libfoo/1.0.0 # unknown package +fail pkg-drop -p # package name expected +fail pkg-drop -p libfoo # unknown package +fail pkg-drop -p libfoo/1.0.0 # unknown package test cfg-create --wipe -test rep-add $rep/satisfy/t4c -test rep-fetch -test build -y libbaz +test cfg-add $rep/satisfy/t4c +test cfg-fetch +test pkg-build -y libbaz -test drop -p -y libfoo libbaz libbar <<EOF +test pkg-drop -p -y libfoo libbaz libbar <<EOF drop libbaz drop libbar drop libfoo @@ -1225,23 +1219,23 @@ EOF # dependents # -fail drop -y libfoo -fail drop -y libfoo libbar -fail drop -y libfoo libbaz +fail pkg-drop -y libfoo +fail pkg-drop -y libfoo libbar +fail pkg-drop -y libfoo libbaz -test drop -p -y --drop-dependent libfoo <<EOF +test pkg-drop -p -y --drop-dependent libfoo <<EOF drop libbaz drop libbar drop libfoo EOF -test drop -p --drop-dependent libfoo libbaz <<EOF +test pkg-drop -p --drop-dependent libfoo libbaz <<EOF drop libbaz drop libbar drop libfoo EOF -test drop -p --drop-dependent libbaz libfoo <<EOF +test pkg-drop -p --drop-dependent libbaz libfoo <<EOF drop libbaz drop libbar drop libfoo @@ -1249,40 +1243,40 @@ EOF # prerequisites # -test drop -p -y libbaz <<EOF +test pkg-drop -p -y libbaz <<EOF drop libbaz drop libbar drop libfoo EOF -test drop -p -n libbaz <<EOF +test pkg-drop -p -n libbaz <<EOF drop libbaz EOF -test drop -p -n libbar libbaz <<EOF +test pkg-drop -p -n libbar libbaz <<EOF drop libbaz drop libbar EOF -test drop -p -n libbaz libbar <<EOF +test pkg-drop -p -n libbaz libbar <<EOF drop libbaz drop libbar EOF # prerequisites and dependents # -test drop -p -y --drop-dependent libbar <<EOF +test pkg-drop -p -y --drop-dependent libbar <<EOF drop libbaz drop libbar drop libfoo EOF test cfg-create --wipe -test rep-add $rep/satisfy/t4d -test rep-fetch -test build -y libbiz +test cfg-add $rep/satisfy/t4d +test cfg-fetch +test pkg-build -y libbiz -test drop -p -y libbiz <<EOF +test pkg-drop -p -y libbiz <<EOF drop libbiz drop libbaz drop libbar @@ -1290,7 +1284,7 @@ drop libfoo drop libfox EOF -test drop -p -y libfox libbiz <<EOF +test pkg-drop -p -y libfox libbiz <<EOF drop libbiz drop libfox drop libbaz @@ -1298,7 +1292,7 @@ drop libbar drop libfoo EOF -test drop -p -y --drop-dependent libfox <<EOF +test pkg-drop -p -y --drop-dependent libfox <<EOF drop libbiz drop libfox drop libbaz @@ -1306,7 +1300,7 @@ drop libbar drop libfoo EOF -test drop -p -y --drop-dependent libbaz <<EOF +test pkg-drop -p -y --drop-dependent libbaz <<EOF drop libbiz drop libbaz drop libbar @@ -1314,7 +1308,7 @@ drop libfoo drop libfox EOF -test drop -p -y --drop-dependent libbar <<EOF +test pkg-drop -p -y --drop-dependent libbar <<EOF drop libbiz drop libbaz drop libbar @@ -1322,7 +1316,7 @@ drop libfoo drop libfox EOF -test drop -p -y --drop-dependent libfoo <<EOF +test pkg-drop -p -y --drop-dependent libfoo <<EOF drop libbiz drop libbaz drop libbar @@ -1330,26 +1324,26 @@ drop libfoo drop libfox EOF -test drop -p -n --drop-dependent libfox libbaz <<EOF +test pkg-drop -p -n --drop-dependent libfox libbaz <<EOF drop libbiz drop libfox drop libbaz EOF -test drop -p -n --drop-dependent libbaz libfox <<EOF +test pkg-drop -p -n --drop-dependent libbaz libfox <<EOF drop libbiz drop libbaz drop libfox EOF -test drop -p -n --drop-dependent libfox libbar <<EOF +test pkg-drop -p -n --drop-dependent libfox libbar <<EOF drop libbiz drop libfox drop libbaz drop libbar EOF -test drop -p -n --drop-dependent libbar libfox <<EOF +test pkg-drop -p -n --drop-dependent libbar libfox <<EOF drop libbiz drop libbaz drop libbar @@ -1358,7 +1352,7 @@ EOF # actually drop # -test drop -y --drop-dependent libbar +test pkg-drop -y --drop-dependent libbar stat libfox/1.0.0 "available" stat libfoo/1.1.0 "unknown" stat libbar/1.1.0 "unknown" |