diff options
-rw-r--r-- | NEWS | 5 | ||||
-rw-r--r-- | bpkg/auth | 2 | ||||
-rw-r--r-- | bpkg/bpkg.cli | 34 | ||||
-rw-r--r-- | bpkg/bpkg.cxx | 28 | ||||
-rw-r--r-- | bpkg/buildfile | 8 | ||||
-rw-r--r-- | bpkg/cfg-add | 19 | ||||
-rw-r--r-- | bpkg/cfg-fetch | 19 | ||||
-rw-r--r-- | bpkg/package | 2 | ||||
-rw-r--r-- | bpkg/pkg-build.cli | 4 | ||||
-rw-r--r-- | bpkg/pkg-build.cxx | 4 | ||||
-rw-r--r-- | bpkg/pkg-fetch.cli | 2 | ||||
-rw-r--r-- | bpkg/pkg-fetch.cxx | 4 | ||||
-rw-r--r-- | bpkg/rep-add | 19 | ||||
-rw-r--r-- | bpkg/rep-add.cli (renamed from bpkg/cfg-add.cli) | 14 | ||||
-rw-r--r-- | bpkg/rep-add.cxx (renamed from bpkg/cfg-add.cxx) | 10 | ||||
-rw-r--r-- | bpkg/rep-fetch | 19 | ||||
-rw-r--r-- | bpkg/rep-fetch.cli (renamed from bpkg/cfg-fetch.cli) | 14 | ||||
-rw-r--r-- | bpkg/rep-fetch.cxx (renamed from bpkg/cfg-fetch.cxx) | 18 | ||||
-rw-r--r-- | doc/buildfile | 4 | ||||
-rwxr-xr-x | doc/cli.sh | 6 | ||||
-rwxr-xr-x | tests/test.sh | 240 |
21 files changed, 238 insertions, 237 deletions
@@ -1,5 +1,8 @@ Version 0.4.0 + * Rename the cfg-add command to rep-add (the add alias stays the same) and + cfg-fetch to rep-fetch (the fetch alias stays the same). + * The pkg-build command now offers to automatically update dependent packages that were reconfigured. @@ -12,7 +15,7 @@ Version 0.4.0 the command's man page for details. * Add support for repository authentication. The rep-create command can now - sign the repository, and cfg-fetch and rep-info commands can authenticate + sign the repository, and rep-fetch and rep-info commands can authenticate the repository being fetched. Version 0.3.0 @@ -28,7 +28,7 @@ namespace bpkg // // Note that one drawback of doing this as part of an existing transaction // is that if things go south and the transaction gets aborted, then all the - // user's confirmations will be lost. For example, cfg-fetch could fail + // user's confirmations will be lost. For example, rep-fetch could fail // because it was unable to fetch some prerequisite repositories. // shared_ptr<const certificate> diff --git a/bpkg/bpkg.cli b/bpkg/bpkg.cli index 107ef0a..13299b3 100644 --- a/bpkg/bpkg.cli +++ b/bpkg/bpkg.cli @@ -155,16 +155,26 @@ namespace bpkg "\l{bpkg-cfg-create(1)} \- create configuration" } - bool cfg-add|add + bool rep-info { - "<rep>", - "\l{bpkg-cfg-add(1)} \- add repository to configuration", - "" + "\l{bpkg-rep-info(1)} \- print repository information" } - bool cfg-fetch|fetch + bool rep-add|add { - "\l{bpkg-cfg-fetch(1)} \- fetch list of available packages" + "\l{bpkg-rep-add(1)} \- add repository to configuration" + } + + bool rep-fetch|fetch + { + "\l{bpkg-rep-fetch(1)} \- fetch list of available packages" + } + + bool rep-create + { + "[<dir>]", + "\l{bpkg-rep-create(1)} \- create repository", + "" } bool pkg-status|status @@ -238,18 +248,6 @@ namespace bpkg { "\l{bpkg-pkg-purge(1)} \- purge package" } - - bool rep-info - { - "\l{bpkg-rep-info(1)} \- print repository information" - } - - bool rep-create - { - "[<dir>]", - "\l{bpkg-rep-create(1)} \- create repository", - "" - } }; // Make sure these don't conflict with command names above. diff --git a/bpkg/bpkg.cxx b/bpkg/bpkg.cxx index c94dde9..561e32e 100644 --- a/bpkg/bpkg.cxx +++ b/bpkg/bpkg.cxx @@ -16,6 +16,8 @@ // #include <bpkg/help> +#include <bpkg/cfg-create> + #include <bpkg/pkg-build> #include <bpkg/pkg-clean> #include <bpkg/pkg-configure> @@ -31,12 +33,10 @@ #include <bpkg/pkg-update> #include <bpkg/pkg-verify> -#include <bpkg/cfg-add> -#include <bpkg/cfg-create> -#include <bpkg/cfg-fetch> - -#include <bpkg/rep-info> +#include <bpkg/rep-add> #include <bpkg/rep-create> +#include <bpkg/rep-fetch> +#include <bpkg/rep-info> using namespace std; using namespace bpkg; @@ -205,6 +205,12 @@ try break; \ } + // cfg-* commands + // +#define CFG_COMMAND(CMD) COMMAND_IMPL(cfg_, "cfg-", CMD) + + CFG_COMMAND (create); + // pkg-* commands // #define PKG_COMMAND(CMD) COMMAND_IMPL(pkg_, "pkg-", CMD) @@ -224,20 +230,14 @@ try PKG_COMMAND (update); PKG_COMMAND (verify); - // cfg-* commands - // -#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 (info); + REP_COMMAND (add); REP_COMMAND (create); + REP_COMMAND (fetch); + REP_COMMAND (info); assert (false); fail << "unhandled command"; diff --git a/bpkg/buildfile b/bpkg/buildfile index 8436c7c..5067780 100644 --- a/bpkg/buildfile +++ b/bpkg/buildfile @@ -13,9 +13,7 @@ exe{bpkg}: \ {hxx cxx}{ auth } \ {hxx }{ bpkg-version } \ { cxx}{ bpkg } {hxx ixx cxx}{ bpkg-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 cxx}{ checksum } \ {hxx ixx cxx}{ common-options } \ {hxx ixx cxx}{ configuration-options } \ @@ -43,7 +41,9 @@ 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 } \ @@ -98,8 +98,8 @@ if! $cli.loaded # rep-* command. # -{hxx ixx cxx}{cfg-add-options}: cli{cfg-add} -{hxx ixx cxx}{cfg-fetch-options}: cli{cfg-fetch} +{hxx ixx cxx}{rep-add-options}: cli{rep-add} +{hxx ixx cxx}{rep-fetch-options}: cli{rep-fetch} {hxx ixx cxx}{rep-info-options}: cli{rep-info} {hxx ixx cxx}{rep-create-options}: cli{rep-create} diff --git a/bpkg/cfg-add b/bpkg/cfg-add deleted file mode 100644 index eec8859..0000000 --- a/bpkg/cfg-add +++ /dev/null @@ -1,19 +0,0 @@ -// file : bpkg/cfg-add -*- C++ -*- -// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -#ifndef BPKG_CFG_ADD -#define BPKG_CFG_ADD - -#include <bpkg/types> -#include <bpkg/utility> - -#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/cfg-fetch b/bpkg/cfg-fetch deleted file mode 100644 index 57a4095..0000000 --- a/bpkg/cfg-fetch +++ /dev/null @@ -1,19 +0,0 @@ -// file : bpkg/cfg-fetch -*- C++ -*- -// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -#ifndef BPKG_CFG_FETCH -#define BPKG_CFG_FETCH - -#include <bpkg/types> -#include <bpkg/utility> - -#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/package b/bpkg/package index 2bfc575..42cf2af 100644 --- a/bpkg/package +++ b/bpkg/package @@ -435,7 +435,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 cfg-fetch). We call such packages + // out (e.g., as a result of rep-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.cli b/bpkg/pkg-build.cli index e0ec9b1..222519b 100644 --- a/bpkg/pkg-build.cli +++ b/bpkg/pkg-build.cli @@ -25,8 +25,8 @@ namespace bpkg 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 repositories. See the \l{bpkg-cfg-add(1)} and - \l{bpkg-cfg-fetch(1)} commands for more information on package + fetched from one of the repositories. See the \l{bpkg-rep-add(1)} and + \l{bpkg-rep-fetch(1)} commands for more information on package repositories. If <ver> is not specified, then the latest available version will be built. To downgrade, the desired version must be specified explicitly. diff --git a/bpkg/pkg-build.cxx b/bpkg/pkg-build.cxx index efb708b..21822f7 100644 --- a/bpkg/pkg-build.cxx +++ b/bpkg/pkg-build.cxx @@ -1042,10 +1042,10 @@ namespace bpkg // if (db.query_value<repository_count> () == 0) dr << info << "configuration " << c << " has no repositories" - << info << "use 'bpkg cfg-add' to add a repository"; + << info << "use 'bpkg rep-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 cfg-fetch' to fetch available packages " + << info << "use 'bpkg rep-fetch' to fetch available packages " << "list"; } diff --git a/bpkg/pkg-fetch.cli b/bpkg/pkg-fetch.cli index 562daab..cefb74e 100644 --- a/bpkg/pkg-fetch.cli +++ b/bpkg/pkg-fetch.cli @@ -20,7 +20,7 @@ namespace bpkg \h|DESCRIPTION| The \cb{pkg-fetch} command fetches the archive for the specified package - name and version from one of the repositories (\l{bpkg-cfg-add(1)}). If + name and version from one of the repositories (\l{bpkg-rep-add(1)}). If the \cb{--replace|-r} option is specified, then \cb{pkg-fetch} will replace the archive of a package that is already in the \cb{fetched} or \cb{unpacked} state (\l{bpkg-pkg-status(1)}). Otherwise, \cb{pkg-fetch} diff --git a/bpkg/pkg-fetch.cxx b/bpkg/pkg-fetch.cxx index 8aba4be..0534e65 100644 --- a/bpkg/pkg-fetch.cxx +++ b/bpkg/pkg-fetch.cxx @@ -178,11 +178,11 @@ namespace bpkg if (db.query_value<repository_count> () == 0) fail << "configuration " << c << " has no repositories" << - info << "use 'bpkg cfg-add' to add a repository"; + info << "use 'bpkg rep-add' to add a repository"; if (db.query_value<available_package_count> () == 0) fail << "configuration " << c << " has no available packages" << - info << "use 'bpkg cfg-fetch' to fetch available packages list"; + info << "use 'bpkg rep-fetch' to fetch available packages list"; // Note that here we compare including the revision (unlike, say in // pkg-status). Which means one cannot just specify 1.0.0 and get 1.0.0+1 diff --git a/bpkg/rep-add b/bpkg/rep-add new file mode 100644 index 0000000..7dcb9b0 --- /dev/null +++ b/bpkg/rep-add @@ -0,0 +1,19 @@ +// file : bpkg/rep-add -*- C++ -*- +// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +#ifndef BPKG_REP_ADD +#define BPKG_REP_ADD + +#include <bpkg/types> +#include <bpkg/utility> + +#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/cfg-add.cli b/bpkg/rep-add.cli index 8bc17c3..c1130c0 100644 --- a/bpkg/cfg-add.cli +++ b/bpkg/rep-add.cli @@ -1,11 +1,11 @@ -// file : bpkg/cfg-add.cli +// file : bpkg/rep-add.cli // copyright : Copyright (c) 2014-2016 Code Synthesis Ltd // license : MIT; see accompanying LICENSE file include <bpkg/configuration.cli>; "\section=1" -"\name=bpkg-cfg-add" +"\name=bpkg-rep-add" "\summary=add repository to configuration" namespace bpkg @@ -15,18 +15,18 @@ namespace bpkg "\h|SYNOPSIS| - \c{\b{bpkg cfg-add}|\b{add} [<options>] <rep>} + \c{\b{bpkg rep-add}|\b{add} [<options>] <rep>} \h|DESCRIPTION| - The \cb{cfg-add} command adds the specified package repository to the + The \cb{rep-add} command adds the specified package repository to the configuration. Note that it doesn't fetch the list of available packages - for the newly added repository. For that, use the \l{bpkg-cfg-fetch(1)} + for the newly added repository. For that, use the \l{bpkg-rep-fetch(1)} command, normally, after adding all the repositories you wish to use." } - class cfg_add_options: configuration_options + class rep_add_options: configuration_options { - "\h|CFG-ADD OPTIONS|" + "\h|REP-ADD OPTIONS|" }; } diff --git a/bpkg/cfg-add.cxx b/bpkg/rep-add.cxx index 5386fff..da5bd4b 100644 --- a/bpkg/cfg-add.cxx +++ b/bpkg/rep-add.cxx @@ -1,8 +1,8 @@ -// file : bpkg/cfg-add.cxx -*- C++ -*- +// file : bpkg/rep-add.cxx -*- C++ -*- // copyright : Copyright (c) 2014-2016 Code Synthesis Ltd // license : MIT; see accompanying LICENSE file -#include <bpkg/cfg-add> +#include <bpkg/rep-add> #include <bpkg/package> #include <bpkg/package-odb> @@ -16,16 +16,16 @@ using namespace butl; namespace bpkg { int - cfg_add (const cfg_add_options& o, cli::scanner& args) + rep_add (const rep_add_options& o, cli::scanner& args) { - tracer trace ("cfg_add"); + tracer trace ("rep_add"); dir_path c (o.directory ()); l4 ([&]{trace << "configuration: " << c;}); if (!args.more ()) fail << "repository location argument expected" << - info << "run 'bpkg help cfg-add' for more information"; + info << "run 'bpkg help rep-add' for more information"; repository_location rl (parse_location (args.next ())); const string& rn (rl.canonical_name ()); diff --git a/bpkg/rep-fetch b/bpkg/rep-fetch new file mode 100644 index 0000000..2adf59a --- /dev/null +++ b/bpkg/rep-fetch @@ -0,0 +1,19 @@ +// file : bpkg/rep-fetch -*- C++ -*- +// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +#ifndef BPKG_REP_FETCH +#define BPKG_REP_FETCH + +#include <bpkg/types> +#include <bpkg/utility> + +#include <bpkg/rep-fetch-options> + +namespace bpkg +{ + int + rep_fetch (const rep_fetch_options&, cli::scanner& args); +} + +#endif // BPKG_REP_FETCH diff --git a/bpkg/cfg-fetch.cli b/bpkg/rep-fetch.cli index 9cc75fd..cada453 100644 --- a/bpkg/cfg-fetch.cli +++ b/bpkg/rep-fetch.cli @@ -1,11 +1,11 @@ -// file : bpkg/cfg-fetch.cli +// file : bpkg/rep-fetch.cli // copyright : Copyright (c) 2014-2016 Code Synthesis Ltd // license : MIT; see accompanying LICENSE file include <bpkg/configuration.cli>; "\section=1" -"\name=bpkg-cfg-fetch" +"\name=bpkg-rep-fetch" "\summary=fetch list of available packages" namespace bpkg @@ -15,18 +15,18 @@ namespace bpkg "\h|SYNOPSIS| - \c{\b{bpkg cfg-fetch}|\b{fetch} [<options>]} + \c{\b{bpkg rep-fetch}|\b{fetch} [<options>]} \h|DESCRIPTION| - The \cb{cfg-fetch} command fetches the list of available packages for all - the repositories that were previously added with the \l{bpkg-cfg-add(1)} + The \cb{rep-fetch} command fetches the list of available packages for all + the repositories that were previously added with the \l{bpkg-rep-add(1)} command as well as all their complement and prerequisite repositories, recursively." } - class cfg_fetch_options: configuration_options + class rep_fetch_options: configuration_options { - "\h|CFG-FETCH OPTIONS|" + "\h|REP-FETCH OPTIONS|" }; } diff --git a/bpkg/cfg-fetch.cxx b/bpkg/rep-fetch.cxx index dfbcc98..fb22986 100644 --- a/bpkg/cfg-fetch.cxx +++ b/bpkg/rep-fetch.cxx @@ -1,8 +1,8 @@ -// file : bpkg/cfg-fetch.cxx -*- C++ -*- +// file : bpkg/rep-fetch.cxx -*- C++ -*- // copyright : Copyright (c) 2014-2016 Code Synthesis Ltd // license : MIT; see accompanying LICENSE file -#include <bpkg/cfg-fetch> +#include <bpkg/rep-fetch> #include <fstream> @@ -21,13 +21,13 @@ using namespace butl; namespace bpkg { static void - cfg_fetch (const configuration_options& co, + rep_fetch (const configuration_options& co, transaction& t, const shared_ptr<repository>& r, const shared_ptr<repository>& root, const string& reason) { - tracer trace ("cfg_fetch(rep)"); + tracer trace ("rep_fetch(rep)"); database& db (t.database ()); tracer_guard tg (db, trace); @@ -152,7 +152,7 @@ namespace bpkg } reason += r->name; - cfg_fetch (co, t, pr, root, reason); + rep_fetch (co, t, pr, root, reason); } // @@ What if we have duplicated? Ideally, we would like to check @@ -254,9 +254,9 @@ namespace bpkg } int - cfg_fetch (const cfg_fetch_options& o, cli::scanner&) + rep_fetch (const rep_fetch_options& o, cli::scanner&) { - tracer trace ("cfg_fetch"); + tracer trace ("rep_fetch"); dir_path c (o.directory ()); l4 ([&]{trace << "configuration: " << c;}); @@ -270,7 +270,7 @@ namespace bpkg if (ua.empty ()) fail << "configuration " << c << " has no repositories" << - info << "use 'bpkg cfg-add' to add a repository"; + info << "use 'bpkg rep-add' to add a repository"; // Clean repositories and available packages. At the end only // repositories that were explicitly added by the user and the @@ -308,7 +308,7 @@ namespace bpkg shared_ptr<repository> r (lp.load ()); if (!r->fetched) // Can already be loaded as a prerequisite/complement. - cfg_fetch (o, t, r, root, ""); // No reason (user-added). + rep_fetch (o, t, r, root, ""); // No reason (user-added). } size_t rcount, pcount; diff --git a/doc/buildfile b/doc/buildfile index 189eb83..ad5b9b9 100644 --- a/doc/buildfile +++ b/doc/buildfile @@ -3,9 +3,7 @@ # license : MIT; see accompanying LICENSE file cmds = \ -bpkg-cfg-add \ bpkg-cfg-create \ -bpkg-cfg-fetch \ bpkg-help \ bpkg-pkg-build \ bpkg-pkg-clean \ @@ -21,7 +19,9 @@ bpkg-pkg-uninstall \ bpkg-pkg-unpack \ bpkg-pkg-update \ bpkg-pkg-verify \ +bpkg-rep-add \ bpkg-rep-create \ +bpkg-rep-fetch \ bpkg-rep-info define css: file @@ -54,9 +54,9 @@ o="--output-prefix bpkg- --class-doc bpkg::common_options=short" compile "common" $o --output-suffix "-options" --class-doc bpkg::common_options=long compile "bpkg" $o --output-prefix "" --suppress-undocumented --class-doc bpkg::commands=short --class-doc bpkg::topics=short -pages="cfg-add cfg-create cfg-fetch help pkg-build pkg-clean pkg-configure \ -pkg-disfigure pkg-drop pkg-fetch pkg-install pkg-purge pkg-status \ -pkg-test pkg-uninstall pkg-unpack pkg-update pkg-verify rep-create rep-info" +pages="cfg-create help pkg-build pkg-clean pkg-configure pkg-disfigure \ +pkg-drop pkg-fetch pkg-install pkg-purge pkg-status pkg-test pkg-uninstall \ +pkg-unpack pkg-update pkg-verify rep-add rep-create rep-fetch rep-info" for p in $pages; do compile $p $o diff --git a/tests/test.sh b/tests/test.sh index de40ed8..b630bda 100755 --- a/tests/test.sh +++ b/tests/test.sh @@ -114,7 +114,7 @@ function test () ops="-d $cfg" fi - if [ "$cmd" = "cfg-fetch" -o \ + if [ "$cmd" = "rep-fetch" -o \ "$cmd" = "rep-info" ]; then ops="$ops --auth all" fi @@ -142,7 +142,7 @@ function fail () ops="-d $cfg" fi - if [ "$cmd" = "cfg-fetch" -o \ + if [ "$cmd" = "rep-fetch" -o \ "$cmd" = "rep-info" ]; then ops="$ops --auth all" fi @@ -328,58 +328,58 @@ stat libfoo unknown ## -## cfg-add +## rep-add ## test cfg-create --wipe -fail cfg-add # repository location expected -fail cfg-add stable # invalid location -fail cfg-add http:// # invalid location +fail rep-add # repository location expected +fail rep-add stable # invalid location +fail rep-add http:// # invalid location # relative path # -test cfg-add ./1/bar/stable -fail cfg-add ./1/../1/bar/stable # duplicate +test rep-add ./1/bar/stable +fail rep-add ./1/../1/bar/stable # duplicate # absolute path # -test cfg-add /tmp/1/foo/stable -fail cfg-add /tmp/1/../1/foo/stable # duplicate +test rep-add /tmp/1/foo/stable +fail rep-add /tmp/1/../1/foo/stable # duplicate # remote URL # -test cfg-add http://pkg.example.org/1/testing -fail cfg-add https://www.example.org/1/testing # duplicate +test rep-add http://pkg.example.org/1/testing +fail rep-add https://www.example.org/1/testing # duplicate ## -## cfg-fetch +## rep-fetch ## test cfg-create --wipe -fail cfg-fetch # no repositories +fail rep-fetch # no repositories # hello repository # test cfg-create --wipe -test cfg-add $rep/common/hello -test cfg-fetch --trust $hello_fp -test cfg-fetch +test rep-add $rep/common/hello +test rep-fetch --trust $hello_fp +test rep-fetch # bar/unstable repository # test cfg-create --wipe -test cfg-add $rep/common/bar/unstable -test cfg-fetch --trust-yes -test cfg-fetch +test rep-add $rep/common/bar/unstable +test rep-fetch --trust-yes +test rep-fetch # both # test cfg-create --wipe -test cfg-add $rep/common/hello -test cfg-add $rep/common/bar/unstable -test cfg-fetch --trust-yes -test cfg-fetch +test rep-add $rep/common/hello +test rep-add $rep/common/bar/unstable +test rep-fetch --trust-yes +test rep-fetch ## @@ -396,13 +396,13 @@ 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 cfg-add $rep/fetch/t1 +test rep-add $rep/fetch/t1 fail pkg-fetch libfoo/1.0.0 # no packages -test cfg-fetch --trust-yes +test rep-fetch --trust-yes fail pkg-fetch libfoo/2+1.0.0 # not available test cfg-create --wipe -test cfg-add $rep/fetch/t1 -test cfg-fetch --trust-yes +test rep-add $rep/fetch/t1 +test rep-fetch --trust-yes test pkg-fetch libfoo/1.0.0 stat libfoo/1.0.0 fetched fail pkg-fetch libfoo/1.0.0 @@ -425,8 +425,8 @@ test pkg-purge libfoo # hello # test cfg-create --wipe -test cfg-add $rep/common/hello -test cfg-fetch --trust $hello_fp +test rep-add $rep/common/hello +test rep-fetch --trust $hello_fp test pkg-fetch libhello/1.0.0+1 test pkg-purge libhello @@ -439,8 +439,8 @@ fail pkg-unpack -r # replace only with existing fail pkg-unpack -e # package directory expected fail pkg-unpack # package name expected -test cfg-add $rep/fetch/t1 -test cfg-fetch --trust-yes +test rep-add $rep/fetch/t1 +test rep-fetch --trust-yes # existing # @@ -482,8 +482,8 @@ test pkg-purge libfoo # hello # test cfg-create --wipe -test cfg-add $rep/common/hello -test cfg-fetch --trust $hello_fp +test rep-add $rep/common/hello +test rep-fetch --trust $hello_fp test pkg-fetch libhello/1.0.0+1 test pkg-unpack libhello test pkg-purge libhello @@ -590,8 +590,8 @@ stat libfoo unknown ## pkg-configure/pkg-disfigure ## test cfg-create --wipe -test cfg-add $rep/common/hello -test cfg-fetch --trust $hello_fp +test rep-add $rep/common/hello +test rep-fetch --trust $hello_fp fail pkg-configure # package name expected fail pkg-configure config.dist.root=/tmp # ditto @@ -689,8 +689,8 @@ fi # test rep-create pkg/1/build2.org/depend/stable test cfg-create --wipe -test cfg-add $rep/depend/stable -test cfg-fetch --trust-yes +test rep-add $rep/depend/stable +test rep-fetch --trust-yes test pkg-fetch libbar/1.0.0 test pkg-unpack libbar @@ -766,8 +766,8 @@ test rep-create pkg/1/build2.org/status/unstable test cfg-create --wipe stat libfoo/1.0.0 "unknown" stat libfoo "unknown" -test cfg-add $rep/status/stable -test cfg-fetch --trust-yes +test rep-add $rep/status/stable +test rep-fetch --trust-yes stat libfoo/1.0.0 "available" stat libfoo "available 1.0.0" test pkg-fetch libfoo/1.0.0 @@ -777,21 +777,21 @@ stat libfoo "fetched 1.0.0" # multiple versions/revisions # test cfg-create --wipe -test cfg-add $rep/status/extra -test cfg-fetch --trust-yes +test rep-add $rep/status/extra +test rep-fetch --trust-yes stat libbar "available 1.1.0+1" -test cfg-add $rep/status/stable -test cfg-fetch --trust-yes +test rep-add $rep/status/stable +test rep-fetch --trust-yes stat libbar "available 1.1.0+1 1.0.0" test cfg-create --wipe -test cfg-add $rep/status/testing -test cfg-fetch --trust-yes +test rep-add $rep/status/testing +test rep-fetch --trust-yes stat libbar "available 1.1.0 1.0.0+1 1.0.0" test cfg-create --wipe -test cfg-add $rep/status/unstable -test cfg-fetch --trust-yes +test rep-add $rep/status/unstable +test rep-fetch --trust-yes 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" @@ -804,8 +804,8 @@ stat libbar "fetched 2.0.0" ## pkg-update ## test cfg-create --wipe -test cfg-add $rep/common/hello -test cfg-fetch --trust $hello_fp +test rep-add $rep/common/hello +test rep-fetch --trust $hello_fp fail pkg-update # package name expected fail pkg-update libhello # no such package @@ -838,8 +838,8 @@ test pkg-purge libhello ## pkg-clean ## test cfg-create --wipe -test cfg-add $rep/common/hello -test cfg-fetch --trust $hello_fp +test rep-add $rep/common/hello +test rep-fetch --trust $hello_fp fail pkg-clean # package name expected fail pkg-clean libhello # no such package @@ -878,8 +878,8 @@ test pkg-purge libhello # build and clean package # test cfg-create --wipe cxx -test cfg-add $rep/common/hello -test cfg-fetch --trust $hello_fp +test rep-add $rep/common/hello +test rep-fetch --trust $hello_fp test pkg-fetch libhello/1.0.0+1 test pkg-unpack libhello test pkg-configure libhello @@ -917,8 +917,8 @@ 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 cfg-add $rep/satisfy/t1 -test cfg-fetch --trust-yes +test rep-add $rep/satisfy/t1 +test rep-fetch --trust-yes 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" @@ -947,8 +947,8 @@ test cfg-create --wipe fail pkg-build pkg/1/build2.org/satisfy/libbar-1.0.0.tar.gz -test cfg-add $rep/satisfy/t2 -test cfg-fetch --trust-yes +test rep-add $rep/satisfy/t2 +test rep-fetch --trust-yes test pkg-build -p libbar <<EOF build libfoo 1.0.0 (required by libbar) @@ -1003,8 +1003,8 @@ test pkg-purge libfoo # test rep-create pkg/1/build2.org/satisfy/t3 test cfg-create --wipe -test cfg-add $rep/satisfy/t3 -test cfg-fetch --trust-yes +test rep-add $rep/satisfy/t3 +test rep-fetch --trust-yes # only in prerequisite repository # @@ -1018,8 +1018,8 @@ build libbar 1.0.0 (required by libbaz) build libbaz 1.0.0 EOF -test cfg-add $rep/satisfy/t2 -test cfg-fetch +test rep-add $rep/satisfy/t2 +test rep-fetch # order # @@ -1123,8 +1123,8 @@ test rep-create pkg/1/build2.org/satisfy/t4c test rep-create pkg/1/build2.org/satisfy/t4d test cfg-create --wipe -test cfg-add $rep/satisfy/t4c -test cfg-fetch --trust-yes +test rep-add $rep/satisfy/t4c +test rep-fetch --trust-yes test pkg-build -p libbaz <<EOF build libfoo 1.1.0 (required by libbar libbaz) @@ -1157,8 +1157,8 @@ test pkg-purge libfoo test pkg-fetch -e pkg/1/build2.org/satisfy/libfoo-1.2.0.tar.gz test pkg-unpack libfoo fail pkg-build -p libbaz -test cfg-add $rep/satisfy/t4a -test cfg-fetch --trust-yes +test rep-add $rep/satisfy/t4a +test rep-fetch --trust-yes test pkg-build -p libfoo/1.1.0 libbaz <<EOF downgrade libfoo 1.1.0 build libbar 1.1.0 (required by libbaz) @@ -1196,9 +1196,9 @@ test pkg-fetch -e pkg/1/build2.org/satisfy/libbaz-1.1.0.tar.gz test pkg-unpack libbaz test pkg-configure libbaz -test cfg-add $rep/satisfy/t4a -test cfg-add $rep/satisfy/t4b -test cfg-fetch --trust-yes +test rep-add $rep/satisfy/t4a +test rep-add $rep/satisfy/t4b +test rep-fetch --trust-yes test pkg-build -p libbar <<EOF upgrade libfoo 1.1.0 (required by libbar libbaz) @@ -1238,8 +1238,8 @@ EOF # actually build # test cfg-create --wipe -test cfg-add $rep/satisfy/t4c -test cfg-fetch --trust-yes +test rep-add $rep/satisfy/t4c +test rep-fetch --trust-yes test pkg-build -y libbaz stat libfoo/1.1.0 "configured" stat libbar/1.1.0 "configured" @@ -1254,16 +1254,16 @@ test pkg-build -y pkg/1/build2.org/satisfy/libfoo-1.1.0/ stat libfoo "configured 1.1.0 hold_package hold_version" test cfg-create --wipe -test cfg-add $rep/satisfy/t4c -test cfg-fetch --trust-yes +test rep-add $rep/satisfy/t4c +test rep-fetch --trust-yes test pkg-build -y libfoo stat libfoo "configured 1.0.0 hold_package" test pkg-build -y libfoo/1.0.0 stat libfoo "configured 1.0.0 hold_package hold_version" test cfg-create --wipe -test cfg-add $rep/satisfy/t4c -test cfg-fetch --trust-yes +test rep-add $rep/satisfy/t4c +test rep-fetch --trust-yes test pkg-build -y libfoo/1.0.0 stat libfoo "configured 1.0.0 hold_package hold_version" @@ -1276,23 +1276,23 @@ test pkg-build -y libfoo stat libfoo "configured 1.0.0 hold_package" test cfg-create --wipe -test cfg-add $rep/satisfy/t4c -test cfg-fetch --trust-yes +test rep-add $rep/satisfy/t4c +test rep-fetch --trust-yes test pkg-build -y libfoo stat libfoo "configured 1.0.0 hold_package" test pkg-build -y libbaz stat libfoo "configured 1.1.0 hold_package" test cfg-create --wipe -test cfg-add $rep/satisfy/t4c -test cfg-fetch --trust-yes +test rep-add $rep/satisfy/t4c +test rep-fetch --trust-yes test pkg-build -y libfoo/1.0.0 stat libfoo "configured 1.0.0 hold_package hold_version" fail pkg-build -y libbaz test cfg-create --wipe -test cfg-add $rep/satisfy/t4c -test cfg-fetch --trust-yes +test rep-add $rep/satisfy/t4c +test rep-fetch --trust-yes test pkg-build -y libbaz stat libfoo "configured 1.1.0" @@ -1300,15 +1300,15 @@ stat libfoo "configured 1.1.0" # test rep-create pkg/1/build2.org/satisfy/t5 test cfg-create --wipe -test cfg-add $rep/satisfy/t2 -test cfg-fetch --trust-yes +test rep-add $rep/satisfy/t2 +test rep-fetch --trust-yes test pkg-build -y libbar stat libfoo "configured 1.0.0" stat libbar "configured 1.0.0 hold_package" -test cfg-add $rep/satisfy/t5 -test cfg-fetch --trust-yes +test rep-add $rep/satisfy/t5 +test rep-fetch --trust-yes test pkg-build -y libbar stat libfoo "available 1.0.0" @@ -1332,8 +1332,8 @@ fail pkg-drop -p libfoo # unknown package fail pkg-drop -p libfoo/1.0.0 # unknown package test cfg-create --wipe -test cfg-add $rep/satisfy/t4c -test cfg-fetch --trust-yes +test rep-add $rep/satisfy/t4c +test rep-fetch --trust-yes test pkg-build -y libbaz test pkg-drop -p -y libfoo libbaz libbar <<EOF @@ -1397,8 +1397,8 @@ drop libfoo EOF test cfg-create --wipe -test cfg-add $rep/satisfy/t4d -test cfg-fetch --trust-yes +test rep-add $rep/satisfy/t4d +test rep-fetch --trust-yes test pkg-build -y libbiz test pkg-drop -p -y libbiz <<EOF @@ -1527,60 +1527,60 @@ rUyP0KNG65tdWnVTMqg6Q/YXhtRZLHoD6+QbiYLlruR1phu4y4fDt7AKxoXfeme/a86A37UogZY= \\ EOF -# cfg-fetch +# rep-fetch # signed_fp=`rep_cert_fp pkg/1/build2.org/auth/signed` test cfg-create --wipe -test cfg-add $rep/auth/signed -test cfg-fetch --trust $signed_fp -test cfg-fetch +test rep-add $rep/auth/signed +test rep-fetch --trust $signed_fp +test rep-fetch test cfg-create --wipe -test cfg-add $rep/auth/signed -test cfg-fetch --trust-no --trust $signed_fp -test cfg-fetch -test cfg-fetch --trust-no # certificate is already trusted +test rep-add $rep/auth/signed +test rep-fetch --trust-no --trust $signed_fp +test rep-fetch +test rep-fetch --trust-no # certificate is already trusted test cfg-create --wipe -test cfg-add $rep/auth/signed -test cfg-fetch --trust-yes -test cfg-fetch +test rep-add $rep/auth/signed +test rep-fetch --trust-yes +test rep-fetch test cfg-create --wipe -test cfg-add $rep/auth/signed -fail cfg-fetch --trust-no +test rep-add $rep/auth/signed +fail rep-fetch --trust-no test cfg-create --wipe -test cfg-add $rep/auth/signed -fail cfg-fetch --trust-yes --trust-no # inconsistent options +test rep-add $rep/auth/signed +fail rep-fetch --trust-yes --trust-no # inconsistent options test cfg-create --wipe -test cfg-add $rep/auth/unsigned1 -test cfg-fetch --trust-yes -test cfg-fetch -test cfg-add $rep/auth/unsigned2 -test cfg-fetch -test cfg-fetch --trust-no # certificates are already trusted +test rep-add $rep/auth/unsigned1 +test rep-fetch --trust-yes +test rep-fetch +test rep-add $rep/auth/unsigned2 +test rep-fetch +test rep-fetch --trust-no # certificates are already trusted test cfg-create --wipe -test cfg-add $rep/auth/unsigned1 -fail cfg-fetch --trust-no +test rep-add $rep/auth/unsigned1 +fail rep-fetch --trust-no test cfg-create --wipe -test cfg-add $rep/auth/name-mismatch -fail cfg-fetch --trust-yes # certificate name mismatch +test rep-add $rep/auth/name-mismatch +fail rep-fetch --trust-yes # certificate name mismatch test cfg-create --wipe -test cfg-add $rep/auth/expired -fail cfg-fetch --trust-yes # certificate expired +test rep-add $rep/auth/expired +fail rep-fetch --trust-yes # certificate expired test cfg-create --wipe -test cfg-add $rep/auth/sha256sum-mismatch -fail cfg-fetch --trust-yes # packages file checksum mismatch +test rep-add $rep/auth/sha256sum-mismatch +fail rep-fetch --trust-yes # packages file checksum mismatch test cfg-create --wipe -test cfg-add $rep/auth/signature-mismatch -fail cfg-fetch --trust-yes # packages file signature:mismatch +test rep-add $rep/auth/signature-mismatch +fail rep-fetch --trust-yes # packages file signature:mismatch # rep-info # |