From f40f28b12046cc993712956497dfb9d9baa452f9 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sat, 19 Jan 2019 21:50:43 +0300 Subject: Add support for --no-progress option --- bpkg/common.cli | 33 ++- bpkg/fetch-git.cxx | 226 ++++++++++----- bpkg/fetch.cxx | 71 ++++- bpkg/pkg-checkout.cxx | 4 +- bpkg/utility.txx | 16 +- tests/pkg-build.testscript | 495 +++++++++++++-------------------- tests/pkg-fetch.testscript | 30 +- tests/rep-fetch-git-refname.testscript | 24 +- tests/rep-fetch.testscript | 10 +- 9 files changed, 483 insertions(+), 426 deletions(-) diff --git a/bpkg/common.cli b/bpkg/common.cli index 31580c0..4090ad3 100644 --- a/bpkg/common.cli +++ b/bpkg/common.cli @@ -100,6 +100,23 @@ namespace bpkg a command." } + // When it comes to external programs (such as curl, git, etc), if stderr + // is not a terminal, the logic is actually tri-state: With --no-progress + // we suppress any progress. With --progress (which we may add in the + // future), we request full progress. Finally, without any --*progress + // options we let the external program decide what to do: it may do + // something intelligent (like curl) and produce non-terminal-friendly + // progress (such as status lines printed periodically) or it may disable + // progress all together (like git). Of course, it may also do no + // detection and dump non-terminal-unfriendly progress in which case we + // should probably do the detection ourselves and suppress it. + // + bool --no-progress + { + "Suppress progress indicators for long-lasting operations, such as + network transfers, building, etc." + } + path --build { "", @@ -138,6 +155,14 @@ namespace bpkg \cb{wget}, and \cb{fetch}." } + strings --fetch-option + { + "", + "Additional option to be passed to the fetch program. See \cb{--fetch} + for more information on the fetch program. Repeat this option to + specify multiple fetch options." + } + size_t --fetch-timeout { "", @@ -157,14 +182,6 @@ namespace bpkg programs." } - strings --fetch-option - { - "", - "Additional option to be passed to the fetch program. See \cb{--fetch} - for more information on the fetch program. Repeat this option to - specify multiple fetch options." - } - path --git = "git" { "", diff --git a/bpkg/fetch-git.cxx b/bpkg/fetch-git.cxx index 1695bcf..ab3255c 100644 --- a/bpkg/fetch-git.cxx +++ b/bpkg/fetch-git.cxx @@ -35,8 +35,6 @@ namespace bpkg static const diag_noreturn_end endg; - using opt = optional; // Program option. - static strings timeout_opts (const common_options& co, repository_protocol proto) { @@ -209,19 +207,77 @@ namespace bpkg } } - // Run git process. + // Run git process, optionally suppressing progress. // template static process_exit - run_git (const common_options& co, A&&... args) + run_git (const common_options& co, bool progress, A&&... args) { + // Unfortunately git doesn't have any kind of a no-progress option. The + // only way to suppress progress is to run quiet (-q) which also + // suppresses some potentially useful information. However, git suppresses + // progress automatically if its stderr is not a terminal. So we use this + // feature for the progress suppression by redirecting git's stderr to our + // own diagnostics stream via a proxy pipe. + // + fdpipe pipe; + + if (!progress) + pipe = open_pipe (); + process pr (start_git (co, - 1 /* stdout */, 2 /* stderr */, + 1 /* stdout */, + !progress ? pipe.out.get () : 2 /* stderr */, forward (args)...)); + + if (!progress) + { + // Shouldn't throw, unless something is severely damaged. + // + pipe.out.close (); + + try + { + ifdstream is (move (pipe.in), fdstream_mode::skip, ifdstream::badbit); + + // We could probably write something like this, instead: + // + // *diag_stream << is.rdbuf () << flush; + // + // However, it would never throw and we could potentially miss the + // reading failure, unless we decide to additionally mess with the + // diagnostics stream exception mask. + // + for (string l; !eof (getline (is, l)); ) + *diag_stream << l << endl; + + is.close (); + + // Fall through. + } + catch (const io_error& e) + { + // Fail if git exited normally with zero code, so the issue won't go + // unnoticed. Otherwise, let the caller handle git's failure. + // + if (pr.wait ()) + fail << "unable to read git diagnostics: " << e; + + // Fall through. + } + } + pr.wait (); return *pr.exit; } + template + static process_exit + run_git (const common_options& co, A&&... args) + { + return run_git (co, true /* progress */, forward (args)...); + } + // Run git process and return it's output as a string. Fail if the output // doesn't contain a single line. // @@ -695,12 +751,15 @@ namespace bpkg if (i != repository_refs.end ()) return i->second; - if (verb) + if (verb && !co.no_progress ()) text << "querying " << url; refs rs; fdpipe pipe (open_pipe ()); + // Note: ls-remote doesn't print anything to stderr, so no progress + // suppression is required. + // process pr (start_git (co, pipe, 2 /* stderr */, timeout_opts (co, url.scheme), @@ -823,7 +882,7 @@ namespace bpkg ? strings ({"--separate-git-dir=" + git_dir.string ()}) : strings (), - verb < 2 ? opt ("-q") : nullopt, + verb < 2 ? "-q" : nullptr, dir)) fail << "unable to init " << dir << endg; @@ -1262,27 +1321,44 @@ namespace bpkg } }; - // Note that we suppress the (too detailed) fetch command output if the - // verbosity level is 1. However, we still want to see the progress in - // this case, unless stderr is not directed to a terminal. + // Map verbosity level. Suppress the (too detailed) fetch command output + // if the verbosity level is 1. However, we still want to see the + // progress in this case, unless we were asked to suppress it (git also + // suppress progress for a non-terminal stderr). // + cstrings vos; + bool progress (!co.no_progress ()); + + if (verb < 2) + { + vos.push_back ("-q"); + + if (progress) + { + if (verb == 1 && stderr_term) + vos.push_back ("--progress"); + } + else + progress = true; // Already suppressed with -q. + } + else if (verb > 3) + vos.push_back ("-v"); + // Also note that we don't need to specify --refmap option since we can // rely on the init() function that properly sets the // remote.origin.fetch configuration option. // if (!run_git (co, + progress, timeout_opts (co, url ().scheme), co.git_option (), "-C", dir, "fetch", "--no-recurse-submodules", - - shallow ? cstrings ({"--depth", "1"}) : - shallow_repo () ? cstrings ({"--unshallow"}) : - cstrings (), - - verb == 1 && fdterm (2) ? opt ("--progress") : nullopt, - verb < 2 ? opt ("-q") : verb > 3 ? opt ("-v") : nullopt, + (shallow ? cstrings ({"--depth", "1"}) : + shallow_repo () ? cstrings ({"--unshallow"}) : + cstrings ()), + vos, "origin", remapped_refspecs ? *remapped_refspecs : refspecs)) fail << "unable to fetch " << dir << endg; @@ -1294,72 +1370,74 @@ namespace bpkg fail << "unable to test if " << dir << " is shallow" << endg; }; - // Print the progress indicator. - // - // Note that the clone command prints the following line prior to the - // progress lines: - // - // Cloning into ''... - // - // The fetch command doesn't print anything similar, for some reason. - // This makes it hard to understand which superproject/submodule is - // currently being fetched. Let's fix that. + // Print progress. // - // Also note that we have "fixed" that capital letter nonsense and stripped - // the trailing '...'. - // - if (verb) + if (verb && !co.no_progress ()) { - diag_record dr (text); - dr << "fetching "; + // Note that the clone command prints the following line prior to the + // progress lines: + // + // Cloning into ''... + // + // The fetch command doesn't print anything similar, for some reason. + // This makes it hard to understand which superproject/submodule is + // currently being fetched. Let's fix that. + // + // Also note that we have "fixed" that capital letter nonsense and + // stripped the trailing '...'. + // + { + diag_record dr (text); + dr << "fetching "; - if (!submodule.empty ()) - dr << "submodule '" << submodule.posix_string () << "' "; + if (!submodule.empty ()) + dr << "submodule '" << submodule.posix_string () << "' "; - dr << "from " << url (); + dr << "from " << url (); - if (verb >= 2) - dr << " in '" << dir.posix_string () << "'"; // Is used by tests. - } + if (verb >= 2) + dr << " in '" << dir.posix_string () << "'"; // Is used by tests. + } - // First, we perform the deep fetching. - // - if (fetch_repo || !dcs.empty ()) - { // Print warnings prior to the deep fetching. // + if (fetch_repo || !dcs.empty ()) { - diag_record dr (warn); - dr << "fetching whole " << (fetch_repo ? "repository" : "reference") - << " history"; - - if (!submodule.empty ()) - dr << " for submodule '" << submodule.posix_string () << "'"; + { + diag_record dr (warn); + dr << "fetching whole " << (fetch_repo ? "repository" : "reference") + << " history"; + + if (!submodule.empty ()) + dr << " for submodule '" << submodule.posix_string () << "'"; + + dr << " (" + << (caps () == capabilities::dumb + ? "dumb HTTP" + : "unadvertised commit") // There are no other reasons so far. + << ')'; + } - dr << " (" - << (caps () == capabilities::dumb - ? "dumb HTTP" - : "unadvertised commit") // There are no other reasons so far. - << ')'; + if (caps () == capabilities::dumb) + warn << "no progress will be shown (dumb HTTP)"; } + } - if (caps () == capabilities::dumb) - warn << "no progress will be shown (dumb HTTP)"; - - // Fetch. - // - fetch (fetch_repo ? strings () : dcs, false); + // Fetch. + // + // First, we perform the deep fetching. + // + fetch (fetch_repo ? strings () : dcs, false); - // After the deep fetching some of the shallow commits might also be - // fetched, so we drop them from the fetch list. - // - for (auto i (scs.begin ()); i != scs.end (); ) - { - if (commit_fetched (co, dir, *i)) - i = scs.erase (i); - else - ++i; - } + // After the deep fetching some of the shallow commits might also be + // fetched, so we drop them from the fetch list. + // + for (auto i (scs.begin ()); i != scs.end (); ) + { + if (commit_fetched (co, dir, *i)) + i = scs.erase (i); + else + ++i; } // Finally, we perform the shallow fetching. @@ -1425,7 +1503,7 @@ namespace bpkg : strings (), "submodule--helper", "init", - verb < 2 ? opt ("-q") : nullopt)) + verb < 2 ? "-q" : nullptr)) failure ("unable to initialize submodules"); repository_url orig_url (origin_url (co, dir)); @@ -1589,7 +1667,7 @@ namespace bpkg // Let's make the message match the git-submodule script output // (again, except for capitalization). // - if (verb) + if (verb && !co.no_progress ()) text << "submodule path '" << psd << "': checked out '" << commit << "'"; @@ -1716,7 +1794,7 @@ namespace bpkg "-C", dir, "reset", "--hard", - verb < 2 ? opt ("-q") : nullopt, + verb < 2 ? "-q" : nullptr, commit)); if (!pr.wait ()) fail << "unable to reset to " << commit << endg; @@ -1729,7 +1807,7 @@ namespace bpkg "-d", "-x", "-ff", - verb < 2 ? opt ("-q") : nullopt)) + verb < 2 ? "-q" : nullptr)) fail << "unable to clean " << dir << endg; } diff --git a/bpkg/fetch.cxx b/bpkg/fetch.cxx index 1aaff37..aaabffe 100644 --- a/bpkg/fetch.cxx +++ b/bpkg/fetch.cxx @@ -91,6 +91,7 @@ namespace bpkg static process start_wget (const path& prog, const optional& timeout, + bool no_progress, const strings& ops, const string& url, const path& out) @@ -119,7 +120,10 @@ namespace bpkg // user re-runs the command with -v to see all the gory details. // if (verb < (fo ? 1 : 2)) + { args.push_back ("-q"); + no_progress = false; // Already suppressed with -q. + } else if (fo && verb == 1) { // Wget 1.16 introduced the --show-progress option which in the @@ -129,12 +133,24 @@ namespace bpkg if (wget_major > 1 || (wget_major == 1 && wget_minor >= 16)) { args.push_back ("-q"); - args.push_back ("--show-progress"); + + if (!no_progress) + args.push_back ("--show-progress"); + else + no_progress = false; // Already suppressed with -q. } } else if (verb > 3) args.push_back ("-d"); + // Suppress progress. + // + // Note: the `--no-verbose -d` options combination is valid and results in + // debug messages with the progress meter suppressed. + // + if (no_progress) + args.push_back ("--no-verbose"); + // Set download timeout if requested. // string tm; @@ -224,6 +240,7 @@ namespace bpkg static process start_curl (const path& prog, const optional& timeout, + bool no_progress, const strings& ops, const string& url, const path& out) @@ -237,6 +254,12 @@ namespace bpkg "-A", (BPKG_USER_AGENT " curl") }; + auto suppress_progress = [&args] () + { + args.push_back ("-s"); + args.push_back ("-S"); // But show errors. + }; + // Map verbosity level. If we are running quiet or at level 1 // and the output is stdout, then run curl quiet. If at level // 1 and the output is a file, then show the progress bar. At @@ -246,14 +269,25 @@ namespace bpkg // if (verb < (fo ? 1 : 2)) { - args.push_back ("-s"); - args.push_back ("-S"); // But show errors. + suppress_progress (); + no_progress = false; // Already suppressed. } else if (fo && verb == 1) - args.push_back ("--progress-bar"); + { + if (!no_progress) + args.push_back ("--progress-bar"); + } else if (verb > 3) args.push_back ("-v"); + // Suppress progress. + // + // Note: the `-v -s` options combination is valid and results in a verbose + // output without progress. + // + if (no_progress) + suppress_progress (); + // Set download timeout if requested. // string tm; @@ -285,7 +319,7 @@ namespace bpkg if (verb >= 2) print_process (args); - else if (verb == 1 && fo) + else if (verb == 1 && fo && !no_progress) // // Unfortunately curl doesn't print the filename being fetched // next to the progress bar. So the best we can do is print it @@ -350,6 +384,7 @@ namespace bpkg static process start_fetch (const path& prog, const optional& timeout, + bool no_progress, const strings& ops, const string& url, const path& out) @@ -369,10 +404,28 @@ namespace bpkg // level 2 or 3, then run it at the default level (so it will display // the progress). Higher than that -- run it verbose. // + // Note that the only way to suppress progress for the fetch program is to + // run it quiet (-q). However, it prints nothing but the progress by + // default and some additional information in the verbose mode (-v). + // Therefore, if the progress suppression is requested we will run quiet + // unless the verbosity level is greater than three, in which case we will + // run verbose (and with progress). That's the best we can do. + // if (verb < (fo ? 1 : 2)) + { args.push_back ("-q"); + no_progress = false; // Already suppressed with -q. + } else if (verb > 3) + { args.push_back ("-v"); + no_progress = false; // Don't be quiet in the verbose mode (see above). + } + + // Suppress progress. + // + if (no_progress) + args.push_back ("-q"); // Set download timeout if requested. // @@ -417,8 +470,8 @@ namespace bpkg // The dispatcher. // - // Cache the result of finding/testing the fetch program. Sometimes - // a simple global variable is really the right solution... + // Cache the result of finding/testing the fetch program. Sometimes a simple + // global variable is really the right solution... // enum kind {wget, curl, fetch}; @@ -509,6 +562,7 @@ namespace bpkg { process (*f) (const path&, const optional&, + bool, const strings&, const string&, const path&) = nullptr; @@ -526,7 +580,8 @@ namespace bpkg try { - return f (fetch_path, timeout, o.fetch_option (), url, out); + return f ( + fetch_path, timeout, o.no_progress (), o.fetch_option (), url, out); } catch (const process_error& e) { diff --git a/bpkg/pkg-checkout.cxx b/bpkg/pkg-checkout.cxx index 6e0f92a..a91cb92 100644 --- a/bpkg/pkg-checkout.cxx +++ b/bpkg/pkg-checkout.cxx @@ -42,7 +42,7 @@ namespace bpkg // Print the progress indicator to attribute the possible fetching // progress. // - if (verb) + if (verb && !o.no_progress ()) text << "checking out " << package_string (ap->id.name, ap->version); @@ -194,7 +194,7 @@ namespace bpkg // At verbosity level 1 we want our (nicer) progress header but the // build system's actual progress. // - if (verb == 1) + if (verb == 1 && !o.no_progress ()) text << "distributing " << n << '/' << v; run_b (o, diff --git a/bpkg/utility.txx b/bpkg/utility.txx index 93699ab..71701bc 100644 --- a/bpkg/utility.txx +++ b/bpkg/utility.txx @@ -36,17 +36,26 @@ namespace bpkg // as us. // string vl; + bool no_progress (co.no_progress ()); if (verb == 0) + { ops.push_back ("-q"); + no_progress = false; // Already suppressed with -q. + } else if (verb == 1) { if (v != verb_b::normal) { ops.push_back ("-q"); - if (v == verb_b::progress && stderr_term) - ops.push_back ("--progress"); + if (!no_progress) + { + if (v == verb_b::progress && stderr_term) + ops.push_back ("--progress"); + } + else + no_progress = false; // Already suppressed with -q. } } else if (verb == 2) @@ -58,6 +67,9 @@ namespace bpkg ops.push_back (vl.c_str ()); } + if (no_progress) + ops.push_back ("--no-progress"); + return process_start_callback ( [] (const char* const args[], size_t n) { diff --git a/tests/pkg-build.testscript b/tests/pkg-build.testscript index 66b1c18..6724a4e 100644 --- a/tests/pkg-build.testscript +++ b/tests/pkg-build.testscript @@ -152,6 +152,11 @@ rep_add += -d cfg 2>! rep_remove += -d cfg 2>! rep_fetch += -d cfg --auth all --trust-yes 2>! +# Let's disable the progress indication that complicates stderr output +# validation. +# +test.options += --no-progress + : libfoo : : Test building different versions of libfoo. @@ -802,16 +807,13 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! $clone_root_cfg && $rep_add $rep/t4c && $rep_fetch; $* libbaz 2>>~%EOE%; - %.* - %.*fetched libfoo/1.1.0% + fetched libfoo/1.1.0 unpacked libfoo/1.1.0 configured libfoo/1.1.0 - %.* - %.*fetched libbar/1.1.0% + fetched libbar/1.1.0 unpacked libbar/1.1.0 configured libbar/1.1.0 - %.* - %.*fetched libbaz/1.1.0% + fetched libbaz/1.1.0 unpacked libbaz/1.1.0 configured libbaz/1.1.0 %info: .+ is up to date% @@ -896,8 +898,7 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! $clone_cfg; $* libfoo 2>>~%EOE%; - %.* - %.*fetched libfoo/1.0.0% + fetched libfoo/1.0.0 unpacked libfoo/1.0.0 configured libfoo/1.0.0 %info: .+ is up to date% @@ -923,8 +924,7 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! $clone_cfg; $* libfoo/1.0.0 2>>~%EOE%; - %.* - %.*fetched libfoo/1.0.0% + fetched libfoo/1.0.0 unpacked libfoo/1.0.0 configured libfoo/1.0.0 %info: .+ is up to date% @@ -943,16 +943,13 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! $clone_cfg; $* libbaz 2>>~%EOE%; - %.* - %.*fetched libfoo/1.1.0% + fetched libfoo/1.1.0 unpacked libfoo/1.1.0 configured libfoo/1.1.0 - %.* - %.*fetched libbar/1.1.0% + fetched libbar/1.1.0 unpacked libbar/1.1.0 configured libbar/1.1.0 - %.* - %.*fetched libbaz/1.1.0% + fetched libbaz/1.1.0 unpacked libbaz/1.1.0 configured libbaz/1.1.0 %info: .+ is up to date% @@ -977,8 +974,7 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! $clone_cfg; $* libfoo 2>>~%EOE%; - %.* - %.*fetched libfoo/1.0.0% + fetched libfoo/1.0.0 unpacked libfoo/1.0.0 configured libfoo/1.0.0 %info: .+ is up to date% @@ -990,16 +986,13 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! $* libbaz 2>>~%EOE%; warning: package libbar dependency on (libfoo == 1.1.0) is forcing upgrade of libfoo/1.0.0 to 1.1.0 disfigured libfoo/1.0.0 - %.* - %.*fetched libfoo/1.1.0% + fetched libfoo/1.1.0 unpacked libfoo/1.1.0 configured libfoo/1.1.0 - %.* - %.*fetched libbar/1.1.0% + fetched libbar/1.1.0 unpacked libbar/1.1.0 configured libbar/1.1.0 - %.* - %.*fetched libbaz/1.1.0% + fetched libbaz/1.1.0 unpacked libbaz/1.1.0 configured libbaz/1.1.0 %info: .+ is up to date% @@ -1024,8 +1017,7 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! $clone_cfg; $* libfoo/1.0.0 2>>~%EOE%; - %.* - %.*fetched libfoo/1.0.0% + fetched libfoo/1.0.0 unpacked libfoo/1.0.0 configured libfoo/1.0.0 %info: .+ is up to date% @@ -1053,12 +1045,10 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! $clone_root_cfg && $rep_add $rep/t2 && $rep_fetch; $* libbar 2>>~%EOE%; - %.* - %.*fetched libfoo/1.0.0% + fetched libfoo/1.0.0 unpacked libfoo/1.0.0 configured libfoo/1.0.0 - %.* - %.*fetched libbar/1.0.0% + fetched libbar/1.0.0 unpacked libbar/1.0.0 configured libbar/1.0.0 %info: .+ is up to date% @@ -1074,8 +1064,7 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! disfigured libbar/1.0.0 disfigured libfoo/1.0.0 purged libfoo/1.0.0 - %.* - %.*fetched libbar/1.2.0% + fetched libbar/1.2.0 unpacked libbar/1.2.0 configured libbar/1.2.0 %info: .+ is up to date% @@ -1087,12 +1076,10 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! $* libbar/1.0.0 libfoo 2>>~%EOE%; disfigured libbar/1.2.0 - %.* - %.*fetched libfoo/1.0.0% + fetched libfoo/1.0.0 unpacked libfoo/1.0.0 configured libfoo/1.0.0 - %.* - %.*fetched libbar/1.0.0% + fetched libbar/1.0.0 unpacked libbar/1.0.0 configured libbar/1.0.0 %info: .+ is up to date%{2} @@ -1105,8 +1092,7 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! $* libbar 2>>~%EOE%; disfigured libbar/1.0.0 - %.* - %.*fetched libbar/1.2.0% + fetched libbar/1.2.0 unpacked libbar/1.2.0 configured libbar/1.2.0 %info: .+ is up to date% @@ -1147,8 +1133,7 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! $rep_add $rep/t4a && $rep_fetch; $* ./libbar/ 2>>~%EOE%; - %.* - %.*fetched libfoo/1.1.0% + fetched libfoo/1.1.0 unpacked libfoo/1.1.0 configured libfoo/1.1.0 using libbar/1.1.0 (external) @@ -1180,12 +1165,10 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! $clone_root_cfg && $rep_fetch $rep/t2 $rep/t5; $* libbar/1.0 2>>~%EOE%; - %.* - %.*fetched libfoo/1.0.0% + fetched libfoo/1.0.0 unpacked libfoo/1.0.0 configured libfoo/1.0.0 - %.* - %.*fetched libbar/1.0.0% + fetched libbar/1.0.0 unpacked libbar/1.0.0 configured libbar/1.0.0 %info: .+ is up to date% @@ -1196,8 +1179,7 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! disfigured libbar/1.0.0 disfigured libfoo/1.0.0 purged libfoo/1.0.0 - %.* - %.*fetched libbar/1.2.0% + fetched libbar/1.2.0 unpacked libbar/1.2.0 configured libbar/1.2.0 %info: .+ is up to date% @@ -1237,12 +1219,10 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! $* libbar --yes 2>>~%EOE%; warning: package libbar dependency on (libfoo == 1.1.0) is forcing upgrade of libfoo/1.0.0 to 1.1.0 disfigured libfoo/1.0.0 - %.* - %.*fetched libfoo/1.1.0% + fetched libfoo/1.1.0 unpacked libfoo/1.1.0 configured libfoo/1.1.0 - %.* - %.*fetched libbar/1.1.0% + fetched libbar/1.1.0 unpacked libbar/1.1.0 configured libbar/1.1.0 %info: .+ is up to date% @@ -1297,12 +1277,10 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! $* libbar --yes 2>>~%EOE%; disfigured libbar/1.0.0 disfigured libfoo/1.0.0 - %.* - %.*fetched libfoo/1.1.0% + fetched libfoo/1.1.0 unpacked libfoo/1.1.0 configured libfoo/1.1.0 - %.* - %.*fetched libbar/1.1.0% + fetched libbar/1.1.0 unpacked libbar/1.1.0 configured libbar/1.1.0 %info: .+ is up to date% @@ -1339,25 +1317,22 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! { $clone_cfg; - $* --yes libbar/1.0.0 2>>~%EOE%; - %.* - %.*fetched libfoo/1.0.0% + $* --yes libbar/1.0.0 2>>EOE; + fetched libfoo/1.0.0 unpacked libfoo/1.0.0 configured libfoo/1.0.0 - %.* - %.*fetched libbar/1.0.0% + fetched libbar/1.0.0 unpacked libbar/1.0.0 configured libbar/1.0.0 EOE - $* libbar/1.2.0 <'y' 2>>~%EOE%; + $* libbar/1.2.0 <'y' 2>>EOE; drop libfoo/1.0.0 (unused) upgrade libbar/1.2.0 continue? [Y/n] disfigured libbar/1.0.0 disfigured libfoo/1.0.0 purged libfoo/1.0.0 - %.* - %.*fetched libbar/1.2.0% + fetched libbar/1.2.0 unpacked libbar/1.2.0 configured libbar/1.2.0 EOE @@ -1375,22 +1350,19 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! { $clone_cfg; - $* --yes libbar/1.0.0 2>>~%EOE%; - %.* - %.*fetched libfoo/1.0.0% + $* --yes libbar/1.0.0 2>>EOE; + fetched libfoo/1.0.0 unpacked libfoo/1.0.0 configured libfoo/1.0.0 - %.* - %.*fetched libbar/1.0.0% + fetched libbar/1.0.0 unpacked libbar/1.0.0 configured libbar/1.0.0 EOE - $* --keep-unused libbar/1.2.0 <'y' 2>>~%EOE%; + $* --keep-unused libbar/1.2.0 <'y' 2>>EOE; upgrade libbar/1.2.0 continue? [Y/n] disfigured libbar/1.0.0 - %.* - %.*fetched libbar/1.2.0% + fetched libbar/1.2.0 unpacked libbar/1.2.0 configured libbar/1.2.0 EOE @@ -1417,18 +1389,16 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! $pkg_status libbaz >'libbaz configured 0.0.1 available 0.1.0 0.0.4 0.0.3'; $pkg_status libfox >'libfox configured 0.0.1'; - $* libbar 2>>~%EOE%; + $* libbar 2>>EOE; disfigured libbar/0.0.1 disfigured libbaz/0.0.1 disfigured libfox/0.0.1 - %.* - %.*fetched libfoo/1.0.0% + fetched libfoo/1.0.0 unpacked libfoo/1.0.0 configured libfoo/1.0.0 purged libfox/0.0.1 purged libbaz/0.0.1 - %.* - %.*fetched libbar/1.0.0% + fetched libbar/1.0.0 unpacked libbar/1.0.0 configured libbar/1.0.0 EOE @@ -1456,7 +1426,7 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! $pkg_status libbaz >'libbaz configured 0.0.1 available 0.1.0 0.0.4 0.0.3'; $pkg_status libfox >'libfox configured 0.0.1'; - $* ?libbar ?libbaz/0.0.3 2>>~%EOE%; + $* ?libbar ?libbaz/0.0.3 2>>EOE; disfigured libbar/0.0.1 disfigured libbaz/0.0.1 disfigured libfox/0.0.1 @@ -1519,21 +1489,17 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! info: while satisfying libbiz/0.0.2 EOE - $* libfix libbiz ?libbaz/0.0.3 2>>~%EOE%; - %.* - %.*fetched libfoo/1.0.0% + $* libfix libbiz ?libbaz/0.0.3 2>>EOE; + fetched libfoo/1.0.0 unpacked libfoo/1.0.0 configured libfoo/1.0.0 - %.* - %.*fetched libbaz/0.0.3% + fetched libbaz/0.0.3 unpacked libbaz/0.0.3 configured libbaz/0.0.3 - %.* - %.*fetched libfix/0.0.3% + fetched libfix/0.0.3 unpacked libfix/0.0.3 configured libfix/0.0.3 - %.* - %.*fetched libbiz/0.0.2% + fetched libbiz/0.0.2 unpacked libbiz/0.0.2 configured libbiz/0.0.2 EOE @@ -1555,21 +1521,17 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! $clone_root_cfg; $rep_fetch $rep/t0b $rep/t0c; - $* libbiz libfix ?libbaz/0.0.3 2>>~%EOE%; - %.* - %.*fetched libfoo/1.0.0% + $* libbiz libfix ?libbaz/0.0.3 2>>EOE; + fetched libfoo/1.0.0 unpacked libfoo/1.0.0 configured libfoo/1.0.0 - %.* - %.*fetched libbaz/0.0.3% + fetched libbaz/0.0.3 unpacked libbaz/0.0.3 configured libbaz/0.0.3 - %.* - %.*fetched libbiz/0.0.2% + fetched libbiz/0.0.2 unpacked libbiz/0.0.2 configured libbiz/0.0.2 - %.* - %.*fetched libfix/0.0.3% + fetched libfix/0.0.3 unpacked libfix/0.0.3 configured libfix/0.0.3 EOE @@ -1602,21 +1564,17 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! info: while satisfying libbiz/0.0.1 EOE - $* libbiz ?libfox/0.0.1 2>>~%EOE%; - %.* - %.*fetched libfox/0.0.1% + $* libbiz ?libfox/0.0.1 2>>EOE; + fetched libfox/0.0.1 unpacked libfox/0.0.1 configured libfox/0.0.1 - %.* - %.*fetched libfoo/1.0.0% + fetched libfoo/1.0.0 unpacked libfoo/1.0.0 configured libfoo/1.0.0 - %.* - %.*fetched libbox/0.0.2% + fetched libbox/0.0.2 unpacked libbox/0.0.2 configured libbox/0.0.2 - %.* - %.*fetched libbiz/0.0.1% + fetched libbiz/0.0.1 unpacked libbiz/0.0.1 configured libbiz/0.0.1 EOE @@ -1722,15 +1680,14 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! { $clone_cfg; - $* libbar '?sys:libfoo' 2>>~%EOE%; + $* libbar '?sys:libfoo' 2>>EOE; configured sys:libfoo/* - %.* - %.*fetched libbar/1.0.0% + fetched libbar/1.0.0 unpacked libbar/1.0.0 configured libbar/1.0.0 EOE - $* '?sys:libfoo/0.1' 2>>~%EOE%; + $* '?sys:libfoo/0.1' 2>>EOE; disfigured libbar/1.0.0 purged libfoo/* configured sys:libfoo/0.1 @@ -1745,10 +1702,9 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! { $clone_cfg; - $* libbar '?sys:libfoo' 2>>~%EOE%; + $* libbar '?sys:libfoo' 2>>EOE; configured sys:libfoo/* - %.* - %.*fetched libbar/1.0.0% + fetched libbar/1.0.0 unpacked libbar/1.0.0 configured libbar/1.0.0 EOE @@ -1763,23 +1719,20 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! { $clone_cfg; - $* libbar/0.0.1 '?sys:libbaz' 2>>~%EOE%; + $* libbar/0.0.1 '?sys:libbaz' 2>>EOE; configured sys:libbaz/* - %.* - %.*fetched libbar/0.0.1% + fetched libbar/0.0.1 unpacked libbar/0.0.1 configured libbar/0.0.1 EOE - $* '?libbaz' 2>>~%EOE%; + $* '?libbaz' 2>>EOE; disfigured libbar/0.0.1 purged libbaz/* - %.* - %.*fetched libfox/0.0.1% + fetched libfox/0.0.1 unpacked libfox/0.0.1 configured libfox/0.0.1 - %.* - %.*fetched libbaz/0.0.1% + fetched libbaz/0.0.1 unpacked libbaz/0.0.1 configured libbaz/0.0.1 configured libbar/0.0.1 @@ -1793,15 +1746,14 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! { $clone_cfg; - $* libbar '?sys:libfoo/0.1' 2>>~%EOE%; + $* libbar '?sys:libfoo/0.1' 2>>EOE; configured sys:libfoo/0.1 - %.* - %.*fetched libbar/1.0.0% + fetched libbar/1.0.0 unpacked libbar/1.0.0 configured libbar/1.0.0 EOE - $* '?sys:libfoo' 2>>~%EOE%; + $* '?sys:libfoo' 2>>EOE; disfigured libbar/1.0.0 purged libfoo/0.1 configured sys:libfoo/* @@ -1816,10 +1768,9 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! { $clone_cfg; - $* libbar '?sys:libfoo/0.1' 2>>~%EOE%; + $* libbar '?sys:libfoo/0.1' 2>>EOE; configured sys:libfoo/0.1 - %.* - %.*fetched libbar/1.0.0% + fetched libbar/1.0.0 unpacked libbar/1.0.0 configured libbar/1.0.0 EOE @@ -1834,15 +1785,14 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! { $clone_cfg; - $* libbar '?sys:libfoo/0.2' 2>>~%EOE%; + $* libbar '?sys:libfoo/0.2' 2>>EOE; configured sys:libfoo/0.2 - %.* - %.*fetched libbar/1.0.0% + fetched libbar/1.0.0 unpacked libbar/1.0.0 configured libbar/1.0.0 EOE - $* '?sys:libfoo/0.1' 2>>~%EOE%; + $* '?sys:libfoo/0.1' 2>>EOE; disfigured libbar/1.0.0 purged libfoo/0.2 configured sys:libfoo/0.1 @@ -1857,23 +1807,20 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! { $clone_cfg; - $* libbar/0.0.1 '?sys:libbaz/0.0.1' 2>>~%EOE%; + $* libbar/0.0.1 '?sys:libbaz/0.0.1' 2>>EOE; configured sys:libbaz/0.0.1 - %.* - %.*fetched libbar/0.0.1% + fetched libbar/0.0.1 unpacked libbar/0.0.1 configured libbar/0.0.1 EOE - $* '?libbaz/0.0.1' 2>>~%EOE%; + $* '?libbaz/0.0.1' 2>>EOE; disfigured libbar/0.0.1 purged libbaz/0.0.1 - %.* - %.*fetched libfox/0.0.1% + fetched libfox/0.0.1 unpacked libfox/0.0.1 configured libfox/0.0.1 - %.* - %.*fetched libbaz/0.0.1% + fetched libbaz/0.0.1 unpacked libbaz/0.0.1 configured libbaz/0.0.1 configured libbar/0.0.1 @@ -1887,22 +1834,19 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! { $clone_cfg; - $* libbar/0.0.1 '?libbaz' 2>>~%EOE%; - %.* - %.*fetched libfox/0.0.1% + $* libbar/0.0.1 '?libbaz' 2>>EOE; + fetched libfox/0.0.1 unpacked libfox/0.0.1 configured libfox/0.0.1 - %.* - %.*fetched libbaz/0.0.1% + fetched libbaz/0.0.1 unpacked libbaz/0.0.1 configured libbaz/0.0.1 - %.* - %.*fetched libbar/0.0.1% + fetched libbar/0.0.1 unpacked libbar/0.0.1 configured libbar/0.0.1 EOE - $* '?sys:libbaz' 2>>~%EOE%; + $* '?sys:libbaz' 2>>EOE; disfigured libbar/0.0.1 disfigured libbaz/0.0.1 disfigured libfox/0.0.1 @@ -1920,22 +1864,19 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! { $clone_cfg; - $* libbar/0.0.1 '?libbaz/0.0.1' 2>>~%EOE%; - %.* - %.*fetched libfox/0.0.1% + $* libbar/0.0.1 '?libbaz/0.0.1' 2>>EOE; + fetched libfox/0.0.1 unpacked libfox/0.0.1 configured libfox/0.0.1 - %.* - %.*fetched libbaz/0.0.1% + fetched libbaz/0.0.1 unpacked libbaz/0.0.1 configured libbaz/0.0.1 - %.* - %.*fetched libbar/0.0.1% + fetched libbar/0.0.1 unpacked libbar/0.0.1 configured libbar/0.0.1 EOE - $* '?sys:libbaz/0.0.1' 2>>~%EOE%; + $* '?sys:libbaz/0.0.1' 2>>EOE; disfigured libbar/0.0.1 disfigured libbaz/0.0.1 disfigured libfox/0.0.1 @@ -1978,21 +1919,18 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! $pkg_status libbaz >'libbaz configured 0.0.1 available 0.1.0 0.0.4 0.0.3 0.0.2'; - $* libbar/0.0.2 ?libbaz 2>>~%EOE%; + $* libbar/0.0.2 ?libbaz 2>>EOE; disfigured libbar/0.0.1 disfigured libbaz/0.0.1 disfigured libfox/0.0.1 purged libfox/0.0.1 - %.* - %.*fetched libfoo/1.0.0% + fetched libfoo/1.0.0 unpacked libfoo/1.0.0 configured libfoo/1.0.0 - %.* - %.*fetched libbaz/0.0.2% + fetched libbaz/0.0.2 unpacked libbaz/0.0.2 configured libbaz/0.0.2 - %.* - %.*fetched libbar/0.0.2% + fetched libbar/0.0.2 unpacked libbar/0.0.2 configured libbar/0.0.2 EOE @@ -2004,9 +1942,8 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! # Test that the selected package, that is "better" than the available # one, is left. # - $* libbox ?libbaz 2>>~%EOE%; - %.* - %.*fetched libbox/0.0.1% + $* libbox ?libbaz 2>>EOE; + fetched libbox/0.0.1 unpacked libbox/0.0.1 configured libbox/0.0.1 EOE @@ -2022,7 +1959,7 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! # Test that the above behavior is not triggered for the system package. # - $* '?sys:libbaz' 2>>~%EOE%; + $* '?sys:libbaz' 2>>EOE; disfigured libbar/0.0.2 disfigured libbox/0.0.1 disfigured libbaz/0.0.2 @@ -2076,19 +2013,17 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! # anymore). So we replace libfoo upgrade with drop and start from # scratch. # - $* ?libfoo/1.0.0 ?libbaz/0.0.1 2>>~%EOE%; + $* ?libfoo/1.0.0 ?libbaz/0.0.1 2>>EOE; disfigured libbox/0.0.1 disfigured libbaz/0.0.3 disfigured libfoo/0.0.1 disfigured libfix/0.0.1 purged libfix/0.0.1 purged libfoo/0.0.1 - %.* - %.*fetched libfox/0.0.1% + fetched libfox/0.0.1 unpacked libfox/0.0.1 configured libfox/0.0.1 - %.* - %.*fetched libbaz/0.0.1% + fetched libbaz/0.0.1 unpacked libbaz/0.0.1 configured libbaz/0.0.1 configured libbox/0.0.1 @@ -2273,27 +2208,28 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! $clone_root_cfg; $rep_fetch $rep/t0a $rep/t0b; - $* libbar libfoo/0.0.1 2>>~%EOE%; - %.* - %.*fetched libfoo/0.0.1% + $* libbar libfoo/0.0.1 2>>EOE; + fetched libfix/0.0.1 + unpacked libfix/0.0.1 + configured libfix/0.0.1 + fetched libfoo/0.0.1 unpacked libfoo/0.0.1 configured libfoo/0.0.1 - %.* - %.*fetched libbaz/0.0.2% + fetched libbaz/0.0.2 unpacked libbaz/0.0.2 configured libbaz/0.0.2 - %.* - %.*fetched libbar/0.0.2% + fetched libbar/0.0.2 unpacked libbar/0.0.2 configured libbar/0.0.2 EOE - $* libbar libfoo 2>>~%EOE%; + $* libbar libfoo 2>>EOE; disfigured libbar/0.0.2 disfigured libbaz/0.0.2 disfigured libfoo/0.0.1 - %.* - %.*fetched libfoo/1.0.0% + disfigured libfix/0.0.1 + purged libfix/0.0.1 + fetched libfoo/1.0.0 unpacked libfoo/1.0.0 configured libfoo/1.0.0 configured libbaz/0.0.2 @@ -2314,30 +2250,25 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! $clone_root_cfg; $rep_fetch $rep/t0a; - $* libfoo 2>>~%EOE%; - %.* - %.*fetched libfix/0.0.1% + $* libfoo 2>>EOE; + fetched libfix/0.0.1 unpacked libfix/0.0.1 configured libfix/0.0.1 - %.* - %.*fetched libfoo/0.0.1% + fetched libfoo/0.0.1 unpacked libfoo/0.0.1 configured libfoo/0.0.1 EOE - $* libbaz libbar 'sys:libfix' 2>>~%EOE%; + $* libbaz libbar 'sys:libfix' 2>>EOE; disfigured libfoo/0.0.1 disfigured libfix/0.0.1 - %.* - %.*fetched libfox/0.0.1% + fetched libfox/0.0.1 unpacked libfox/0.0.1 configured libfox/0.0.1 - %.* - %.*fetched libbaz/0.0.1% + fetched libbaz/0.0.1 unpacked libbaz/0.0.1 configured libbaz/0.0.1 - %.* - %.*fetched libbar/0.0.1% + fetched libbar/0.0.1 unpacked libbar/0.0.1 configured libbar/0.0.1 purged libfix/0.0.1 @@ -2359,21 +2290,17 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! +$clone_root_cfg +$rep_fetch $rep/t0a $rep/t0b $rep/t0c - +$* libbar/0.0.2 libbaz/0.0.2 libfoo/0.0.1 --yes 2>>~%EOE% - %.* - %.*fetched libfix/0.0.1% + +$* libbar/0.0.2 libbaz/0.0.2 libfoo/0.0.1 --yes 2>>EOE + fetched libfix/0.0.1 unpacked libfix/0.0.1 configured libfix/0.0.1 - %.* - %.*fetched libfoo/0.0.1% + fetched libfoo/0.0.1 unpacked libfoo/0.0.1 configured libfoo/0.0.1 - %.* - %.*fetched libbaz/0.0.2% + fetched libbaz/0.0.2 unpacked libbaz/0.0.2 configured libbaz/0.0.2 - %.* - %.*fetched libbar/0.0.2% + fetched libbar/0.0.2 unpacked libbar/0.0.2 configured libbar/0.0.2 EOE @@ -2385,15 +2312,13 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! { $clone_cfg; - $* libbar/0.0.3 --immediate --yes 2>>~%EOE%; + $* libbar/0.0.3 --immediate --yes 2>>EOE; disfigured libbar/0.0.2 disfigured libbaz/0.0.2 - %.* - %.*fetched libbaz/0.1.0% + fetched libbaz/0.1.0 unpacked libbaz/0.1.0 configured libbaz/0.1.0 - %.* - %.*fetched libbar/0.0.3% + fetched libbar/0.0.3 unpacked libbar/0.0.3 configured libbar/0.0.3 EOE @@ -2408,20 +2333,19 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! { $clone_cfg; - $* libbar/0.0.3 --recursive --yes 2>>~%EOE%; + $* libbar/0.0.3 --recursive --yes 2>>EOE; disfigured libbar/0.0.2 disfigured libbaz/0.0.2 disfigured libfoo/0.0.1 - %.* - %.*fetched libfoo/1.0.0% + disfigured libfix/0.0.1 + purged libfix/0.0.1 + fetched libfoo/1.0.0 unpacked libfoo/1.0.0 configured libfoo/1.0.0 - %.* - %.*fetched libbaz/0.1.0% + fetched libbaz/0.1.0 unpacked libbaz/0.1.0 configured libbaz/0.1.0 - %.* - %.*fetched libbar/0.0.3% + fetched libbar/0.0.3 unpacked libbar/0.0.3 configured libbar/0.0.3 EOE @@ -2438,7 +2362,7 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! $* ?libfoo/0.0.1 ?libbaz/0.0.2; # Unhold. - $* --upgrade --recursive <'y' 2>>~%EOE% + $* --upgrade --recursive <'y' 2>>EOE drop libfix/0.0.1 (unused) upgrade libfoo/1.0.0 drop libbaz/0.0.2 (unused) @@ -2448,13 +2372,11 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! disfigured libfoo/0.0.1 disfigured libfix/0.0.1 purged libfix/0.0.1 - %.* - %.*fetched libfoo/1.0.0% + fetched libfoo/1.0.0 unpacked libfoo/1.0.0 configured libfoo/1.0.0 purged libbaz/0.0.2 - %.* - %.*fetched libbar/1.0.0% + fetched libbar/1.0.0 unpacked libbar/1.0.0 configured libbar/1.0.0 EOE @@ -2465,7 +2387,7 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! { $clone_cfg; - $* libbaz/0.0.2 --recursive <'y' 2>>~%EOE% + $* libbaz/0.0.2 --recursive <'y' 2>>EOE drop libfix/0.0.1 (unused) upgrade libfoo/1.0.0 reconfigure libbaz/0.0.2 @@ -2475,8 +2397,7 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! disfigured libfoo/0.0.1 disfigured libfix/0.0.1 purged libfix/0.0.1 - %.* - %.*fetched libfoo/1.0.0% + fetched libfoo/1.0.0 unpacked libfoo/1.0.0 configured libfoo/1.0.0 configured libbaz/0.0.2 @@ -2489,20 +2410,19 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! { $clone_cfg; - $* libbar/0.0.3 ?libbaz/0.0.3 --recursive --yes 2>>~%EOE%; + $* libbar/0.0.3 ?libbaz/0.0.3 --recursive --yes 2>>EOE; disfigured libbar/0.0.2 disfigured libbaz/0.0.2 disfigured libfoo/0.0.1 - %.* - %.*fetched libfoo/1.0.0% + disfigured libfix/0.0.1 + purged libfix/0.0.1 + fetched libfoo/1.0.0 unpacked libfoo/1.0.0 configured libfoo/1.0.0 - %.* - %.*fetched libbaz/0.0.3% + fetched libbaz/0.0.3 unpacked libbaz/0.0.3 configured libbaz/0.0.3 - %.* - %.*fetched libbar/0.0.3% + fetched libbar/0.0.3 unpacked libbar/0.0.3 configured libbar/0.0.3 EOE @@ -2515,20 +2435,19 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! { $clone_cfg; - $* libbar/0.0.3 ?libbaz/0.0.3 ?libfoo --recursive --yes 2>>~%EOE%; + $* libbar/0.0.3 ?libbaz/0.0.3 ?libfoo --recursive --yes 2>>EOE; disfigured libbar/0.0.2 disfigured libbaz/0.0.2 disfigured libfoo/0.0.1 - %.* - %.*fetched libfoo/1.0.0% + disfigured libfix/0.0.1 + purged libfix/0.0.1 + fetched libfoo/1.0.0 unpacked libfoo/1.0.0 configured libfoo/1.0.0 - %.* - %.*fetched libbaz/0.0.3% + fetched libbaz/0.0.3 unpacked libbaz/0.0.3 configured libbaz/0.0.3 - %.* - %.*fetched libbar/0.0.3% + fetched libbar/0.0.3 unpacked libbar/0.0.3 configured libbar/0.0.3 EOE @@ -2569,12 +2488,10 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! $clone_cfg; $* --yes libbar 2>>~%EOE%; - %.* - %.*fetched libfoo/1.0.0% + fetched libfoo/1.0.0 unpacked libfoo/1.0.0 configured libfoo/1.0.0 - %.* - %.*fetched libbar/1.0.0% + fetched libbar/1.0.0 unpacked libbar/1.0.0 configured libbar/1.0.0 %info: .+ is up to date% @@ -2588,8 +2505,7 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! reconfigure libbar (dependent of libfoo) continue? [Y/n] disfigured libbar/1.0.0 disfigured libfoo/1.0.0 - %.* - %.*fetched libfoo/1.1.0% + fetched libfoo/1.1.0 unpacked libfoo/1.1.0 configured libfoo/1.1.0 configured libbar/1.0.0 @@ -2613,12 +2529,10 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! $clone_cfg; $* --yes libbar 2>>~%EOE%; - %.* - %.*fetched libfoo/1.0.0% + fetched libfoo/1.0.0 unpacked libfoo/1.0.0 configured libfoo/1.0.0 - %.* - %.*fetched libbar/1.0.0% + fetched libbar/1.0.0 unpacked libbar/1.0.0 configured libbar/1.0.0 %info: .+ is up to date% @@ -2632,8 +2546,7 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! reconfigure libbar (dependent of libfoo) continue? [Y/n] disfigured libbar/1.0.0 disfigured libfoo/1.0.0 - %.* - %.*fetched libfoo/1.1.0% + fetched libfoo/1.1.0 unpacked libfoo/1.1.0 configured libfoo/1.1.0 configured libbar/1.0.0 @@ -2720,12 +2633,11 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! $* libbaz/0.0.3 2>!; - $* libbaz --patch 2>>~%EOE%; + $* libbaz --patch 2>>EOE; disfigured libbaz/0.0.3 disfigured libfoo/1.0.0 purged libfoo/1.0.0 - %.* - %.*fetched libbaz/0.0.4% + fetched libbaz/0.0.4 unpacked libbaz/0.0.4 configured libbaz/0.0.4 EOE @@ -2738,23 +2650,20 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! { $clone_cfg; - $* libbaz/0.0.3 --patch 2>>~%EOE%; - %.* - %.*fetched libfoo/1.0.0% + $* libbaz/0.0.3 --patch 2>>EOE; + fetched libfoo/1.0.0 unpacked libfoo/1.0.0 configured libfoo/1.0.0 - %.* - %.*fetched libbaz/0.0.3% + fetched libbaz/0.0.3 unpacked libbaz/0.0.3 configured libbaz/0.0.3 EOE - $* libbaz/0.1.0 --patch 2>>~%EOE%; + $* libbaz/0.1.0 --patch 2>>EOE; disfigured libbaz/0.0.3 disfigured libfoo/1.0.0 purged libfoo/1.0.0 - %.* - %.*fetched libbaz/0.1.0% + fetched libbaz/0.1.0 unpacked libbaz/0.1.0 configured libbaz/0.1.0 EOE @@ -2769,7 +2678,7 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! $* 'sys:libbaz/0.0.3-alpha' 2>!; - $* libbaz --patch 2>>~%EOE%; + $* libbaz --patch 2>>EOE; warning: unable to patch libbaz/0.0.3-alpha info: package is not using semantic/standard version info: nothing to build @@ -2785,21 +2694,17 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! +$clone_cfg +$rep_fetch $rep/t0c - +$* libbox libfix ?libbaz/0.0.3 2>>~%EOE% - %.* - %.*fetched libfoo/1.0.0% + +$* libbox libfix ?libbaz/0.0.3 2>>EOE + fetched libfoo/1.0.0 unpacked libfoo/1.0.0 configured libfoo/1.0.0 - %.* - %.*fetched libbaz/0.0.3% + fetched libbaz/0.0.3 unpacked libbaz/0.0.3 configured libbaz/0.0.3 - %.* - %.*fetched libbox/0.0.1% + fetched libbox/0.0.1 unpacked libbox/0.0.1 configured libbox/0.0.1 - %.* - %.*fetched libfix/0.0.3% + fetched libfix/0.0.3 unpacked libfix/0.0.3 configured libfix/0.0.3 EOE @@ -2814,14 +2719,13 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! { $clone_cfg; - $* ?libbaz +{ --patch } --upgrade 2>>~%EOE% + $* ?libbaz +{ --patch } --upgrade 2>>EOE disfigured libbox/0.0.1 disfigured libfix/0.0.3 disfigured libbaz/0.0.3 disfigured libfoo/1.0.0 purged libfoo/1.0.0 - %.* - %.*fetched libbaz/0.0.4% + fetched libbaz/0.0.4 unpacked libbaz/0.0.4 configured libbaz/0.0.4 configured libfix/0.0.3 @@ -2836,7 +2740,7 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! $* '?sys:libbaz/0.0.4-alpha' 2>!; - $* ?libbaz --patch 2>>~%EOE% + $* ?libbaz --patch 2>>EOE warning: unable to patch libbaz/0.0.4-alpha info: package is not using semantic/standard version EOE @@ -2847,14 +2751,13 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! { $clone_cfg; - $* --patch --recursive 2>>~%EOE% + $* --patch --recursive 2>>EOE disfigured libfix/0.0.3 disfigured libbox/0.0.1 disfigured libbaz/0.0.3 disfigured libfoo/1.0.0 purged libfoo/1.0.0 - %.* - %.*fetched libbaz/0.0.4% + fetched libbaz/0.0.4 unpacked libbaz/0.0.4 configured libbaz/0.0.4 configured libbox/0.0.1 @@ -2869,14 +2772,13 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! { $clone_cfg; - $* libbox +{ --upgrade-immediate } libfix +{ --patch-immediate } 2>>~%EOE% + $* libbox +{ --upgrade-immediate } libfix +{ --patch-immediate } 2>>EOE disfigured libfix/0.0.3 disfigured libbox/0.0.1 disfigured libbaz/0.0.3 disfigured libfoo/1.0.0 purged libfoo/1.0.0 - %.* - %.*fetched libbaz/0.1.0% + fetched libbaz/0.1.0 unpacked libbaz/0.1.0 configured libbaz/0.1.0 configured libbox/0.0.1 @@ -2919,16 +2821,13 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! +$clone_cfg - +$* "libbaz/0.0.3@$rep/t0c" 2>>~%EOE% + +$* "libbaz/0.0.3@$rep/t0c" 2>>EOE added pkg:build2.org/pkg-build/t0c - %.* - %.*fetching pkg:build2.org/pkg-build/t0c% - %.* - %.*fetched libfoo/1.0.0% + fetching pkg:build2.org/pkg-build/t0c + fetched libfoo/1.0.0 unpacked libfoo/1.0.0 configured libfoo/1.0.0 - %.* - %.*fetched libbaz/0.0.3% + fetched libbaz/0.0.3 unpacked libbaz/0.0.3 configured libbaz/0.0.3 EOE @@ -2940,13 +2839,12 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! { $clone_cfg; - $* "libbaz@$rep/t0c" 2>>~%EOE% + $* "libbaz@$rep/t0c" 2>>EOE fetching pkg:build2.org/pkg-build/t0c disfigured libbaz/0.0.3 disfigured libfoo/1.0.0 purged libfoo/1.0.0 - %.* - %.*fetched libbaz/0.0.4% + fetched libbaz/0.0.4 unpacked libbaz/0.0.4 configured libbaz/0.0.4 EOE @@ -2959,14 +2857,13 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! { $clone_cfg; - $* "@$rep/t0c" 2>>~%EOE%; + $* "@$rep/t0c" 2>>EOE; fetching pkg:build2.org/pkg-build/t0c info: package libbar is not present in configuration info: package libbox is not present in configuration info: package libfix is not present in configuration disfigured libbaz/0.0.3 - %.* - %.*fetched libbaz/0.0.4% + fetched libbaz/0.0.4 unpacked libbaz/0.0.4 configured libbaz/0.0.4 EOE @@ -2986,13 +2883,11 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! $clone_cfg; $rep_add $rep/t2 && $rep_fetch; - $* --configure-only --yes libbar 2>>~%EOE%; - %.* - %.*fetched libfoo/1.0.0% + $* --configure-only --yes libbar 2>>EOE; + fetched libfoo/1.0.0 unpacked libfoo/1.0.0 configured libfoo/1.0.0 - %.* - %.*fetched libbar/1.0.0% + fetched libbar/1.0.0 unpacked libbar/1.0.0 configured libbar/1.0.0 EOE @@ -3473,8 +3368,7 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! $* "libbar@$rep/t5" 2>>~%EOE%; added pkg:build2.org/pkg-build/t5 fetching pkg:build2.org/pkg-build/t5 - %.* - %.*fetched libbar/1.2.0% + fetched libbar/1.2.0 unpacked libbar/1.2.0 configured libbar/1.2.0 %info: .+ is up to date% @@ -3485,8 +3379,7 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! added pkg:build2.org/pkg-build/t6 fetching pkg:build2.org/pkg-build/t6 disfigured libbar/1.2.0 - %.* - %.*fetched libBar/2.0.0% + fetched libBar/2.0.0 unpacked libBar/2.0.0 configured libBar/2.0.0 %info: .+ is up to date% @@ -3529,10 +3422,8 @@ else $rep_fetch &cfg/.bpkg/repos/*/***; $* libmbar 2>>~%EOE%; - %distributing style-basic/.+% %checked out style-basic/.+% %configured style-basic/.+% - distributing libmbar/1.0.0 checked out libmbar/1.0.0 configured libmbar/1.0.0 %info: .+ is up to date% @@ -3559,10 +3450,8 @@ else $rep_fetch &cfg/.bpkg/repos/*/***; $* libbaz 2>>~%EOE%; - %distributing style-basic/.+% %checked out style-basic/.+% %configured style-basic/.+% - distributing libbaz/1.0.0 checked out libbaz/1.0.0 configured libbaz/1.0.0 %info: .+ is up to date% diff --git a/tests/pkg-fetch.testscript b/tests/pkg-fetch.testscript index ba7437f..fe14662 100644 --- a/tests/pkg-fetch.testscript +++ b/tests/pkg-fetch.testscript @@ -39,6 +39,11 @@ pkg_unpack += -d cfg rep_add += -d cfg 2>! rep_fetch += -d cfg --auth all 2>! +# Let's disable the progress indication that complicates stderr output +# validation. +# +test.options += --no-progress + : no-archive : $clone_cfg; @@ -96,11 +101,6 @@ $* libfoo/1.0.0 2>>/EOE != 0 EOE } -# Note that when we fetch a package from remote repository the bpkg stderr -# contains fetch program progress output, that comes prior the informational -# message. -# - : fetched-rep : { @@ -118,10 +118,7 @@ $* libfoo/1.0.0 2>>/EOE != 0 { $clone_cfg; - $* libfoo/1.0.0 2>>~%EOE%; - %.* - %.*fetched libfoo/1.0.0% - EOE + $* libfoo/1.0.0 2>'fetched libfoo/1.0.0'; $pkg_status libfoo/1.0.0 1>'libfoo fetched 1.0.0'; @@ -151,20 +148,14 @@ $* libfoo/1.0.0 2>>/EOE != 0 test.arguments += --replace; # Replace existing package. - $* libfoo/1.1.0 2>>~%EOE%; - %.* - %.*fetched libfoo/1.1.0% - EOE + $* libfoo/1.1.0 2>'fetched libfoo/1.1.0'; $pkg_status libfoo/1.1.0 1>'libfoo fetched 1.1.0'; $pkg_unpack libfoo 2>'unpacked libfoo/1.1.0'; $* -e $src/t1/libfoo-1.0.0.tar.gz 2>'using libfoo/1.0.0 (external)'; $pkg_status libfoo/1.0.0 1>'libfoo fetched 1.0.0'; - $* libfoo/1.1.0 2>>~%EOE%; - %.* - %.*fetched libfoo/1.1.0% - EOE + $* libfoo/1.1.0 2>'fetched libfoo/1.1.0'; $pkg_status libfoo/1.1.0 1>'libfoo fetched 1.1.0'; $* -e $src/t1/libfoo-1.0.0.tar.gz 2>'using libfoo/1.0.0 (external)'; @@ -192,10 +183,7 @@ $* libfoo/1.0.0 2>>/EOE != 0 $rep_add $rep/hello; $rep_fetch --trust $cert_fp &cfg/.bpkg/certs/**; - $* libhello/1.0.0 2>>~%EOE%; - %.* - %.*fetched libhello/1.0.0% - EOE + $* libhello/1.0.0 2>'fetched libhello/1.0.0'; $pkg_status libhello/1.0.0 1>'libhello fetched 1.0.0'; diff --git a/tests/rep-fetch-git-refname.testscript b/tests/rep-fetch-git-refname.testscript index 08e552f..e273569 100644 --- a/tests/rep-fetch-git-refname.testscript +++ b/tests/rep-fetch-git-refname.testscript @@ -51,9 +51,9 @@ # # fetching from in 'cfg/.bpkg/tmp/4bde15f59461'... # - $* --verbose 2 2>&1 | \ - sed -n -e "s/fetching from .+ in '\(.+\)'/\$1/p" | \ - sed -n -e 's%(.+[\\/])tmp([\\/].+)%$1repos$2%p' | \ + $* -v 2>&1 | \ + sed -n -e "s/fetching from .+ in '\(.+\)'/\$1/p" | \ + sed -n -e 's%(.+[\\/])tmp([\\/].+)%$1repos$2%p' | \ set r; # Note that the commit for doc/style/basic submodule is not at the branch @@ -147,4 +147,22 @@ $pkg_drop libfoo } + + : no-progress + : + if ($git_fully_supported || $git_protocol != 'https-smart-unadv') + { + $clone_root_cfg && $rep_add "$rep/state0/libfoo.git$fragment"; + + $* --no-progress 2>>~"%EOE%"; + %fetching git:.+libfoo$fragment% + 1 package\(s\) in 1 repository\(s\) + EOE + + $pkg_checkout --no-progress libfoo/1.0.0 2>>EOE; + checked out libfoo/1.0.0 + EOE + + $pkg_drop libfoo + } } diff --git a/tests/rep-fetch.testscript b/tests/rep-fetch.testscript index 3199f1f..3f5e81d 100644 --- a/tests/rep-fetch.testscript +++ b/tests/rep-fetch.testscript @@ -358,7 +358,7 @@ $* 2>>/EOE != 0 { $clone_root_cfg; - $* --verbose 2 $rep/foo/testing <'y' 2>>~%EOE%; + $* -v $rep/foo/testing <'y' 2>>~%EOE%; added pkg:build2.org/rep-fetch/foo/testing %.* warning: repository pkg:build2.org/rep-fetch/foo/testing is unsigned @@ -385,7 +385,7 @@ $* 2>>/EOE != 0 { $clone_root_cfg; - $* --trust $cert_fp --verbose 2 $rep/foo/testing <'y' 2>>~%EOE% &cfg/.bpkg/certs/** + $* -v --trust $cert_fp $rep/foo/testing <'y' 2>>~%EOE% &cfg/.bpkg/certs/** added pkg:build2.org/rep-fetch/foo/testing %.* warning: repository pkg:build2.org/rep-fetch/foo/testing is unsigned @@ -409,7 +409,7 @@ $* 2>>/EOE != 0 y' $clone_root_cfg; - $* --verbose 2 $rep/foo/testing $rep/foo/stable <$yy 2>>~%EOE% &cfg/.bpkg/certs/** + $* -v $rep/foo/testing $rep/foo/stable <$yy 2>>~%EOE% &cfg/.bpkg/certs/** added pkg:build2.org/rep-fetch/foo/testing added pkg:build2.org/rep-fetch/foo/stable fetching pkg:build2.org/rep-fetch/foo/testing @@ -435,7 +435,7 @@ y' { $clone_root_cfg; - $* --trust $cert_fp --verbose 2 $rep/foo/stable $rep/foo/testing <'y' 2>>~%EOE% &cfg/.bpkg/certs/** + $* -v --trust $cert_fp $rep/foo/stable $rep/foo/testing <'y' 2>>~%EOE% &cfg/.bpkg/certs/** added pkg:build2.org/rep-fetch/foo/stable added pkg:build2.org/rep-fetch/foo/testing fetching pkg:build2.org/rep-fetch/foo/stable @@ -829,7 +829,7 @@ else # # fetching from in 'cfg/.bpkg/tmp/4bde15f59461'... # - $* --verbose 2 2>&1 | \ + $* -v 2>&1 | \ sed -n -e "s/fetching from .+ in '\(.+\)'/\$1/p" | \ sed -n -e 's%(.+[\\/])tmp([\\/].+)%$1repos$2%p' | \ set r; -- cgit v1.1