aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-03-16 14:25:17 +0200
committerKaren Arutyunov <karen@codesynthesis.com>2018-03-16 19:03:39 +0300
commit36026ec0a05d74776114ddf5aee096fbda9bc7ee (patch)
tree069ae3f92988641749b3b77865c2b9a12e74e8bb
parentbe961c92f1306ad16392eb90dbaa579353c9033e (diff)
Redo pkg-status output
-rw-r--r--bpkg/package.cxx12
-rw-r--r--bpkg/package.hxx5
-rw-r--r--bpkg/pkg-status.cli97
-rw-r--r--bpkg/pkg-status.cxx202
-rw-r--r--tests/cfg-create.test8
-rw-r--r--tests/pkg-build.test48
-rw-r--r--tests/pkg-checkout.test8
-rw-r--r--tests/pkg-configure.test28
-rw-r--r--tests/pkg-drop.test20
-rw-r--r--tests/pkg-fetch.test14
-rw-r--r--tests/pkg-purge.test28
-rw-r--r--tests/pkg-status.test32
-rw-r--r--tests/pkg-system.test162
-rw-r--r--tests/pkg-unpack.test12
-rw-r--r--tests/rep-auth.test4
-rw-r--r--tests/rep-fetch.test14
-rw-r--r--tests/rep-remove.test18
17 files changed, 396 insertions, 316 deletions
diff --git a/bpkg/package.cxx b/bpkg/package.cxx
index 966be72..da862ef 100644
--- a/bpkg/package.cxx
+++ b/bpkg/package.cxx
@@ -104,10 +104,10 @@ namespace bpkg
return nullptr;
}
- static inline shared_ptr<repository>
- find (const shared_ptr<repository>& r,
- const shared_ptr<available_package>& ap,
- bool prereq)
+ shared_ptr<repository>
+ filter (const shared_ptr<repository>& r,
+ const shared_ptr<available_package>& ap,
+ bool prereq)
{
repositories chain;
return find (r, ap, chain, prereq);
@@ -122,7 +122,7 @@ namespace bpkg
for (shared_ptr<available_package> ap: pointer_result (apr))
{
- if (find (r, ap, prereq) != nullptr)
+ if (filter (r, ap, prereq) != nullptr)
aps.push_back (move (ap));
}
@@ -138,7 +138,7 @@ namespace bpkg
for (shared_ptr<available_package> ap: pointer_result (apr))
{
- if (shared_ptr<repository> pr = find (r, ap, prereq))
+ if (shared_ptr<repository> pr = filter (r, ap, prereq))
return result (move (ap), move (pr));
}
diff --git a/bpkg/package.hxx b/bpkg/package.hxx
index 8c714c4..58338bd 100644
--- a/bpkg/package.hxx
+++ b/bpkg/package.hxx
@@ -499,6 +499,11 @@ namespace bpkg
odb::result<available_package>&&,
bool prereq = true);
+ shared_ptr<repository>
+ filter (const shared_ptr<repository>&,
+ const shared_ptr<available_package>&,
+ bool prereq = true);
+
// package_state
//
enum class package_state
diff --git a/bpkg/pkg-status.cli b/bpkg/pkg-status.cli
index 6157c4d..09c6b2c 100644
--- a/bpkg/pkg-status.cli
+++ b/bpkg/pkg-status.cli
@@ -32,11 +32,11 @@ namespace bpkg
respectively. Note that the status is written to \cb{STDOUT}, not
\cb{STDERR}.
- The status output format is regular. If several packages were specified,
- then each line starts with the package name (and version, if specified)
- followed by '\cb{:}'. Then comes one of the status words listed below.
- Some of them can be optionally followed by '\cb{,}' (no spaces) and a
- sub-status word.
+ The status output format is regular with components separated with
+ spaces. Each line starts with the package name (and version, if
+ specified) followed by one of the status words listed below. Some of
+ them can be optionally followed by '\cb{,}' (no spaces) and a sub-status
+ word.
\dl|
@@ -73,58 +73,65 @@ namespace bpkg
If only the package name was specified without the package version, then
the \cb{available} status word is followed by the list of available
- versions. The last version on this list may have the \cb{sys:} prefix
- indicating an available system version. Such a system version may be
- the special '\cb{?}' value indicating that a package may or may not
- be available from the system and its version is unknown.
+ versions. If the \cb{--system} option is specified, then the last version
+ in this list may have the \cb{sys:} prefix indicating an available system
+ version. Such a system version may be the special '\cb{?}' value
+ indicating that a package may or may not be available from the system and
+ that its version is unknown.
Similarly, if only the package name was specified, then the \cb{fetched},
\cb{unpacked}, \cb{configured}, and \cb{broken} status words are followed
- by the version of the package. After the package version, these status
- words may be followed by one or more sub-status words. Currently, these
- can be \cb{hold_package} (package should not be automatically dropped) and
- \cb{hold_version} (package should not be automatically upgraded). Finally,
- if only the package name was specified and newer versions are available
- from some of the repositories, then the sub-status word is followed
- by '\cb{;}', the \cb{available} status word, and the list of newer
- versions.
+ by the version of the package. If newer versions are available, then the
+ package version is followed by the \cb{available} status word and the
+ list of newer versions.
+
+ If the package name was specified with the version, then only the status
+ (such as, \cb{configured}, \cb{available}, etc.) of this version is
+ printed.
+
+ If a package is being held, then its name is printed prefixed with
+ '\cb{!}'. Similarly, if a package version is being held, then the version
+ is printed prefixed with '\cb{!}'. Held packages and held versions were
+ selected by the user and are not automatically dropped and upgraded,
+ respectively.
Below are some examples, assuming the configuration has \cb{libfoo}
- \cb{1.0.0} configured and held as well as \cb{libfoo} \cb{1.1.0} and
- \cb{1.1.1} available from source and \cb{1.1.0} from the system.
+ \cb{1.0.0} configured and held (both package and version) as well as
+ \cb{libfoo} \cb{1.1.0} and \cb{1.1.1} available from source and
+ \cb{1.1.0} from the system.
\
bpkg status libbar
- unknown
+ libbar unknown
bpkg status libbar/1.0.0
- unknown
+ libbar/1.0.0 unknown
bpkg status libfoo/1.0.0
- configured hold_package
+ !libfoo/1.0.0 configured !1.0.0
bpkg status libfoo/1.1.0
- available 1.1.0 sys:1.1.0
+ libfoo/1.1.0 available 1.1.0
- bpkg status libfoo/1.1.1
- available
+ bpkg status --system libfoo/1.1.0
+ libfoo/1.1.0 available 1.1.0 sys:1.1.0
bpkg status libfoo
- configured 1.0.0 hold_package; available 1.1.0 1.1.1 sys:1.1.0
+ !libfoo configured !1.0.0 available 1.1.0 1.1.1
- bpkg status libfoo/1.0.0 libbar
- libfoo/1.0.0: configured hold_package
- libbar: unknown
+ bpkg status libfoo/1.1.1 libbar
+ libfoo/1.1.1 available 1.1.1
+ libbar unknown
\
Assuming now that we dropped \cb{libfoo} from the configuration:
\
bpkg status libfoo/1.0.0
- unknown
+ libfoo/1.0.0 unknown
bpkg status libfoo
- available 1.1.0 1.1.1 sys:1.1.0
+ libfoo available 1.1.0 1.1.1
\
And assuming now that we built \cb{libfoo} as a system package with
@@ -132,8 +139,7 @@ namespace bpkg
\
bpkg status libfoo
- configured,system * hold_package; available 1.1.0 1.1.1 sys:1.1.0
- unknown
+ !libfoo configured,system * available 1.1.0 1.1.1
\
"
@@ -152,5 +158,30 @@ namespace bpkg
{
"Also print the status of all dependencies, recursively."
}
+
+ bool --constraint
+ {
+ "Print version constraints for dependencies."
+ }
+
+ bool --system
+ {
+ "Check the availability of packages from the system."
+ }
+
+ bool --no-hold
+ {
+ "Don't print the package or version hold status."
+ }
+
+ bool --no-hold-package
+ {
+ "Don't print the package hold status."
+ }
+
+ bool --no-hold-version
+ {
+ "Don't print the version hold status."
+ }
};
}
diff --git a/bpkg/pkg-status.cxx b/bpkg/pkg-status.cxx
index e5144ca..a93322e 100644
--- a/bpkg/pkg-status.cxx
+++ b/bpkg/pkg-status.cxx
@@ -19,19 +19,20 @@ namespace bpkg
{
struct package
{
- string name;
- bpkg::version version; // Empty if unspecified.
- shared_ptr<selected_package> selected; // NULL if none selected.
+ string name;
+ bpkg::version version; // Empty if unspecified.
+ shared_ptr<selected_package> selected; // NULL if none selected.
+ optional<dependency_constraint> constraint; // Version constraint, if any.
};
using packages = vector<package>;
- // If single is true, then omit the package name. If recursive or immediate
- // is true, then print status for dependencies indented by two spaces.
+ // If recursive or immediate is true, then print status for dependencies
+ // indented by two spaces.
//
static void
- pkg_status (database& db,
+ pkg_status (const pkg_status_options& o,
+ database& db,
const packages& pkgs,
- bool single,
string& indent,
bool recursive,
bool immediate)
@@ -42,21 +43,41 @@ namespace bpkg
{
l4 ([&]{trace << "package " << p.name << "; version " << p.version;});
+ // Can't be both.
+ //
+ assert (p.version.empty () || !p.constraint);
+
+ const shared_ptr<selected_package>& s (p.selected);
+
// Look for available packages.
//
- bool available; // At least one vailable package (stub or not).
- vector<shared_ptr<available_package>> apkgs;
+ // Some of them are only available to upgrade/downgrade as dependencies.
+ //
+ struct apkg
+ {
+ shared_ptr<available_package> package;
+ bool build;
+ };
+ vector<apkg> apkgs;
+
+ // A package with this name is known in available packages potentially
+ // for build.
+ //
+ bool known (false);
+ bool build (false);
{
shared_ptr<repository> rep (db.load<repository> ("")); // Root.
using query = query<available_package>;
query q (query::id.name == p.name);
+ {
+ auto r (db.query<available_package> (q));
+ known = !r.empty ();
+ build = filter_one (rep, move (r)).first != nullptr;
+ }
- available =
- filter_one (rep, db.query<available_package> (q)).first != nullptr;
-
- if (available)
+ if (known)
{
// If the user specified the version, then only look for that
// specific version (we still do it since there might be other
@@ -69,103 +90,127 @@ namespace bpkg
false);
// And if we found an existing package, then only look for versions
- // greater than what already exists. Note that for a system wildcard
- // version we will always show all available versions (since it's
- // 0).
+ // greater than to what already exists. Note that for a system
+ // wildcard version we will always show all available versions
+ // (since it's 0).
//
- if (p.selected != nullptr)
- q = q && query::id.version > p.selected->version;
+ if (s != nullptr)
+ q = q && query::id.version > s->version;
q += order_by_version_desc (query::id.version);
- // Only consider packages that are in repositories that were
- // explicitly added to the configuration and their complements,
- // recursively.
+ // Packages that are in repositories that were explicitly added to
+ // the configuration and their complements, recursively, are also
+ // available to build.
//
- apkgs = filter (rep, db.query<available_package> (q));
+ for (shared_ptr<available_package> ap:
+ pointer_result (
+ db.query<available_package> (q)))
+ {
+ bool build (filter (rep, ap));
+ apkgs.push_back (apkg {move (ap), build});
+ }
}
}
cout << indent;
- // Suppress printing the package name if there is only one and it was
- // specified by the user.
+ // Selected.
+ //
+
+ // Hold package status.
//
- if (!single || immediate || recursive)
+ if (s != nullptr)
{
- cout << p.name;
+ if (s->hold_package && !o.no_hold () && !o.no_hold_package ())
+ cout << '!';
+ }
- if (!p.version.empty ())
- cout << '/' << p.version;
+ cout << p.name;
- cout << ": ";
- }
+ if (o.constraint () && p.constraint)
+ cout << ' ' << *p.constraint;
- bool found (false);
+ cout << ' ';
- if (const shared_ptr<selected_package>& s = p.selected)
+ if (s != nullptr)
{
cout << s->state;
if (s->substate != package_substate::none)
cout << ',' << s->substate;
- // Also print the version of the package unless the user specified it.
- //
- if (p.version != s->version)
- cout << ' ' << s->version_string ();
-
- if (s->hold_package)
- cout << " hold_package";
+ cout << ' ';
- if (s->hold_version)
- cout << " hold_version";
+ if (s->hold_version && !o.no_hold () && !o.no_hold_version ())
+ cout << '!';
- found = true;
+ cout << s->version_string ();
}
- if (available)
+ // Available.
+ //
+ bool available (false);
+ if (known)
{
- cout << (found ? "; " : "") << "available";
-
+ // Available from the system.
+ //
// The idea is that in the future we will try to auto-discover a
// system version and then print that. For now we just say "maybe
- // available from the system" but only if no version was specified by
+ // available from the system" even if the version was specified by
// the user. We will later compare it if the user did specify the
// version.
//
- bool sys (p.version.empty ());
+ string sys;
+ if (o.system ())
+ {
+ sys = "?";
+ available = true;
+ }
- if (!apkgs.empty ())
+ // Get rid of stubs.
+ //
+ for (auto i (apkgs.begin ()); i != apkgs.end (); ++i)
{
- // If the user specified the version, then there might only be one
- // entry in which case it is useless to repeat it. But we do want
- // to print it if there is also a system one.
- //
- if (sys ||
- p.version.empty () ||
- apkgs.size () > 1 ||
- p.version != apkgs[0]->version)
+ if (i->package->stub ())
{
- for (const shared_ptr<available_package>& a: apkgs)
- {
- if (a->stub ())
- break; // All the rest are stubs so bail out.
-
- cout << ' ' << a->version;
- }
+ // All the rest are stubs so bail out.
+ //
+ apkgs.erase (i, apkgs.end ());
+ break;
}
- }
- if (sys)
- cout << " sys:?";
+ available = true;
+ }
- found = true;
+ if (available)
+ {
+ cout << (s != nullptr ? " " : "") << "available";
+
+ for (const apkg& a: apkgs)
+ cout << ' '
+ << (a.build ? "" : "[")
+ << a.package->version
+ << (a.build ? "" : "]");
+
+ if (!sys.empty ())
+ cout << ' '
+ << (build ? "" : "[")
+ << "sys:" << sys
+ << (build ? "" : "]");
+ }
}
- if (!found)
+ if (s == nullptr && !available)
+ {
cout << "unknown";
+ // Print the user's version if specified.
+ //
+ if (!p.version.empty ())
+ cout << ' ' << p.version;
+ }
+
cout << endl;
if (recursive || immediate)
@@ -173,21 +218,22 @@ namespace bpkg
// Collect and recurse.
//
packages dpkgs;
- if (p.selected != nullptr)
+ if (s != nullptr)
{
- for (const auto& pair: p.selected->prerequisites)
+ for (const auto& pair: s->prerequisites)
{
shared_ptr<selected_package> d (pair.first.load ());
- dpkgs.push_back (package {d->name, version (), move (d)});
+ const optional<dependency_constraint>& c (pair.second);
+ dpkgs.push_back (package {d->name, version (), move (d), c});
}
}
if (!dpkgs.empty ())
{
indent += " ";
- pkg_status (db,
+ pkg_status (o,
+ db,
dpkgs,
- false /* single */,
indent,
recursive,
false /* immediate */);
@@ -213,7 +259,6 @@ namespace bpkg
session s;
packages pkgs;
- bool single (false); // True if single package specified by the user.
{
using query = query<selected_package>;
@@ -224,7 +269,8 @@ namespace bpkg
const char* arg (args.next ());
package p {parse_package_name (arg),
parse_package_version (arg),
- nullptr};
+ nullptr /* selected */,
+ nullopt /* constraint */};
// Search in the packages that already exist in this configuration.
//
@@ -242,8 +288,6 @@ namespace bpkg
pkgs.push_back (move (p));
}
-
- single = (pkgs.size () == 1);
}
else
{
@@ -253,7 +297,7 @@ namespace bpkg
pointer_result (
db.query<selected_package> (query::hold_package)))
{
- pkgs.push_back (package {s->name, version (), move (s)});
+ pkgs.push_back (package {s->name, version (), move (s), nullopt});
}
if (pkgs.empty ())
@@ -265,7 +309,7 @@ namespace bpkg
}
string indent;
- pkg_status (db, pkgs, single, indent, o.recursive (), o.immediate ());
+ pkg_status (o, db, pkgs, indent, o.recursive (), o.immediate ());
t.commit ();
return 0;
diff --git a/tests/cfg-create.test b/tests/cfg-create.test
index 65fe2f9..c2f70e7 100644
--- a/tests/cfg-create.test
+++ b/tests/cfg-create.test
@@ -26,7 +26,7 @@ EOE
%created new configuration in .+/cfg/%
EOE
- $pkg_status libfoo >'unknown'
+ $pkg_status libfoo >'libfoo unknown'
}
: conf-var
@@ -36,7 +36,7 @@ EOE
%created new configuration in .+/cfg/%
EOE
- $pkg_status libfoo >'unknown';
+ $pkg_status libfoo >'libfoo unknown';
cat cfg/build/config.build >>/~"%EOO%"
%.+
@@ -52,7 +52,7 @@ EOE
%created new configuration in .+/cfg/%
EOE
- $pkg_status libfoo >'unknown';
+ $pkg_status libfoo >'libfoo unknown';
cat cfg/build/config.build >>/~"%EOO%"
%.+
@@ -70,6 +70,6 @@ EOE
%created new configuration in .+/cfg/%
EOE
- $pkg_status libfoo >'unknown'
+ $pkg_status libfoo >'libfoo unknown'
}
}
diff --git a/tests/pkg-build.test b/tests/pkg-build.test
index e70bb1a..f57d51d 100644
--- a/tests/pkg-build.test
+++ b/tests/pkg-build.test
@@ -753,9 +753,9 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
updated libbaz/1.1.0
EOE
- $pkg_status libfoo/1.1.0 >'configured; available';
- $pkg_status libbar/1.1.0 >'configured';
- $pkg_status libbaz/1.1.0 >'configured hold_package; available';
+ $pkg_status libfoo/1.1.0 >'libfoo configured 1.1.0';
+ $pkg_status libbar/1.1.0 >'libbar configured 1.1.0';
+ $pkg_status libbaz/1.1.0 >'!libbaz configured 1.1.0';
$pkg_disfigure libbaz 2>'disfigured libbaz/1.1.0';
$pkg_purge libbaz 2>'purged libbaz/1.1.0';
@@ -783,7 +783,7 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
updated libfoo/1.0.0
EOE
- $pkg_status libfoo >'configured 1.0.0 hold_package hold_version';
+ $pkg_status libfoo >'!libfoo configured !1.0.0';
$* $src/libfoo-1.1.0/ 2>>~%EOE%;
disfigured libfoo/1.0.0
@@ -793,7 +793,7 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
updated libfoo/1.1.0
EOE
- $pkg_status libfoo >'configured 1.1.0 hold_package hold_version';
+ $pkg_status libfoo >'!libfoo configured !1.1.0';
$pkg_disfigure libfoo 2>'disfigured libfoo/1.1.0';
$pkg_purge libfoo 2>'purged libfoo/1.1.0'
@@ -806,14 +806,14 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
$pkg_fetch -e $src/libfoo-1.0.0.tar.gz && $pkg_unpack libfoo;
$pkg_configure libfoo;
- $pkg_status libfoo >'configured 1.0.0';
+ $pkg_status libfoo >'libfoo configured 1.0.0';
$* libfoo 2>>~%EOE%;
%info: .+dir\{libfoo-1.0.0.\} is up to date%
updated libfoo/1.0.0
EOE
- $pkg_status libfoo >'configured 1.0.0 hold_package';
+ $pkg_status libfoo >'!libfoo configured 1.0.0';
$pkg_disfigure libfoo 2>'disfigured libfoo/1.0.0';
$pkg_purge libfoo 2>'purged libfoo/1.0.0'
@@ -839,14 +839,14 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
updated libfoo/1.0.0
EOE
- $pkg_status libfoo >'configured 1.0.0 hold_package; available sys:?';
+ $pkg_status libfoo >'!libfoo configured 1.0.0 available [1.1.0]';
$* libfoo/1.0.0 2>>~%EOE%;
%info: .+dir\{libfoo-1.0.0.\} is up to date%
updated libfoo/1.0.0
EOE
- $pkg_status libfoo >'configured 1.0.0 hold_package hold_version; available sys:?';
+ $pkg_status libfoo >'!libfoo configured !1.0.0 available [1.1.0]';
$pkg_disfigure libfoo 2>'disfigured libfoo/1.0.0';
$pkg_purge libfoo 2>'purged libfoo/1.0.0'
@@ -866,7 +866,7 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
updated libfoo/1.0.0
EOE
- $pkg_status libfoo >'configured 1.0.0 hold_package hold_version; available sys:?';
+ $pkg_status libfoo >'!libfoo configured !1.0.0 available [1.1.0]';
$pkg_disfigure libfoo 2>'disfigured libfoo/1.0.0';
$pkg_purge libfoo 2>'purged libfoo/1.0.0'
@@ -894,7 +894,7 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
updated libbaz/1.1.0
EOE
- $pkg_status libfoo >'configured 1.1.0; available sys:?';
+ $pkg_status libfoo >'libfoo configured 1.1.0';
$pkg_disfigure libbaz 2>'disfigured libbaz/1.1.0';
$pkg_purge libbaz 2>'purged libbaz/1.1.0';
@@ -920,7 +920,7 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
updated libfoo/1.0.0
EOE
- $pkg_status libfoo >'configured 1.0.0 hold_package; available sys:?';
+ $pkg_status libfoo >'!libfoo configured 1.0.0 available [1.1.0]';
$* libbaz 2>>~%EOE%;
warning: package libbar dependency on (libfoo == 1.1.0) is forcing upgrade of libfoo/1.0.0 to 1.1.0
@@ -941,7 +941,7 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
updated libbaz/1.1.0
EOE
- $pkg_status libfoo >'configured 1.1.0 hold_package; available sys:?';
+ $pkg_status libfoo >'!libfoo configured 1.1.0';
$pkg_disfigure libbaz 2>'disfigured libbaz/1.1.0';
$pkg_purge libbaz 2>'purged libbaz/1.1.0';
@@ -967,7 +967,7 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
updated libfoo/1.0.0
EOE
- $pkg_status libfoo >'configured 1.0.0 hold_package hold_version; available sys:?';
+ $pkg_status libfoo >'!libfoo configured !1.0.0 available [1.1.0]';
$* libbaz 2>>EOE != 0;
error: package libbar dependency on (libfoo == 1.1.0) is forcing upgrade of libfoo/1.0.0 to 1.1.0
@@ -1000,8 +1000,8 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
updated libbar/1.0.0
EOE
- $pkg_status libfoo >'configured 1.0.0; available sys:?';
- $pkg_status libbar >'configured 1.0.0 hold_package; available sys:?';
+ $pkg_status libfoo >'libfoo configured 1.0.0';
+ $pkg_status libbar >'!libbar configured 1.0.0';
$rep_add $rep/t5 && $rep_fetch;
@@ -1017,8 +1017,8 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
updated libbar/1.2.0
EOE
- $pkg_status libfoo >'available 1.0.0 sys:?';
- $pkg_status libbar >'configured 1.2.0 hold_package; available sys:?';
+ $pkg_status libfoo >'libfoo available 1.0.0';
+ $pkg_status libbar >'!libbar configured 1.2.0';
$* libbar/1.0.0 libfoo 2>>~%EOE%;
disfigured libbar/1.2.0
@@ -1036,8 +1036,8 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
updated libbar/1.0.0
EOE
- $pkg_status libfoo >'configured 1.0.0 hold_package; available sys:?';
- $pkg_status libbar >'configured 1.0.0 hold_package hold_version; available 1.2.0 sys:?';
+ $pkg_status libfoo >'!libfoo configured 1.0.0';
+ $pkg_status libbar >'!libbar configured !1.0.0 available 1.2.0';
$* libbar 2>>~%EOE%;
disfigured libbar/1.0.0
@@ -1049,8 +1049,8 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
updated libbar/1.2.0
EOE
- $pkg_status libfoo >'configured 1.0.0 hold_package; available sys:?';
- $pkg_status libbar >'configured 1.2.0 hold_package; available sys:?';
+ $pkg_status libfoo >'!libfoo configured 1.0.0';
+ $pkg_status libbar >'!libbar configured 1.2.0';
$pkg_disfigure libbar 2>'disfigured libbar/1.2.0';
$pkg_purge libbar 2>'purged libbar/1.2.0';
@@ -1145,7 +1145,7 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
updated libbar/1.2.0
EOE
- $pkg_status libfoo >'available 1.0.0 sys:?';
+ $pkg_status libfoo >'libfoo available 1.0.0';
$pkg_disfigure libbar 2>'disfigured libbar/1.2.0';
$pkg_purge libbar 2>'purged libbar/1.2.0'
@@ -1182,7 +1182,7 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
updated libbar/1.2.0
EOE
- $pkg_status libfoo >'configured 1.0.0; available sys:?';
+ $pkg_status libfoo >'libfoo configured 1.0.0';
$pkg_disfigure libbar 2>'disfigured libbar/1.2.0';
$pkg_purge libbar 2>'purged libbar/1.2.0';
diff --git a/tests/pkg-checkout.test b/tests/pkg-checkout.test
index 714ad5b..46f8841 100644
--- a/tests/pkg-checkout.test
+++ b/tests/pkg-checkout.test
@@ -57,7 +57,7 @@ else
$rep_add "$rep/libbar.git#master" && $rep_add "$rep/style-basic.git#master";
$rep_fetch;
- $pkg_status style-basic | sed -n -e 's/available ([^ ]+).+/\1/p' | set v;
+ $pkg_status style-basic | sed -n -e 's/style-basic available \[.+\] ([^ ]+)/\1/p' | set v;
$* "style-basic/$v" 2>>"EOE";
dist style-basic-$v
@@ -90,16 +90,16 @@ else
$rep_fetch;
$pkg_status style-basic | \
- sed -n -e 's/available ([^ ]+) +([^ ]+).+/\1 \2/p' | set vs;
+ sed -n -e 's/style-basic available ([^ ]+) +([^ ]+)/\1 \2/p' | set vs;
echo "$vs" | sed -e 's/([^ ]+).+/\1/' | set v0;
echo "$vs" | sed -e 's/([^ ]+) +([^ ]+)/\2/' | set v1;
$* "style-basic/$v0" 2>!;
- $pkg_status style-basic >~"/unpacked $v0;.+/";
+ $pkg_status style-basic >~"/style-basic unpacked $v0/";
$* --replace "style-basic/$v1" 2>!;
- $pkg_status style-basic >~"/unpacked $v1;.+/";
+ $pkg_status style-basic >~"/style-basic unpacked $v1 .+/";
$pkg_purge style-basic
}
diff --git a/tests/pkg-configure.test b/tests/pkg-configure.test
index c82593c..3b455ff 100644
--- a/tests/pkg-configure.test
+++ b/tests/pkg-configure.test
@@ -156,12 +156,12 @@ $* libhello libhello 2>>EOE != 0
$pkg_fetch libhello/1.0.0 && $pkg_unpack libhello;
$* libhello 2>'configured libhello/1.0.0';
- $pkg_status libhello 1>'configured 1.0.0; available sys:?';
+ $pkg_status libhello 1>'libhello configured 1.0.0';
$pkg_disfigure libhello 2>'disfigured libhello/1.0.0';
- $pkg_status libhello 1>'unpacked 1.0.0; available sys:?';
+ $pkg_status libhello 1>'libhello unpacked 1.0.0';
$pkg_purge libhello 2>'purged libhello/1.0.0';
- $pkg_status libhello/1.0.0 1>'available'
+ $pkg_status libhello/1.0.0 1>'libhello available 1.0.0'
}
}
@@ -171,12 +171,12 @@ $* libhello libhello 2>>EOE != 0
$clone_cfg && $pkg_unpack -e $src/libhello-1.0.0;
$* libhello 2>'configured libhello/1.0.0';
- $pkg_status libhello 1>'configured 1.0.0';
+ $pkg_status libhello 1>'libhello configured 1.0.0';
$pkg_disfigure libhello 2>'disfigured libhello/1.0.0';
- $pkg_status libhello 1>'unpacked 1.0.0';
+ $pkg_status libhello 1>'libhello unpacked 1.0.0';
$pkg_purge libhello 2>'purged libhello/1.0.0';
- $pkg_status libhello 1>'unknown';
+ $pkg_status libhello 1>'libhello unknown';
test -d cfg/libhello-1.0.0 == 1
}
@@ -190,10 +190,10 @@ $* libhello libhello 2>>EOE != 0
$pkg_disfigure libhello 2>'disfigured libhello/1.0.0';
- $pkg_status libhello/1.0.0 >'unpacked';
+ $pkg_status libhello/1.0.0 >'libhello unpacked 1.0.0';
$pkg_purge -f libhello 2>'purged libhello/1.0.0';
- $pkg_status libhello/1.0.0 1>'unknown'
+ $pkg_status libhello/1.0.0 1>'libhello unknown 1.0.0'
}
: broken
@@ -213,12 +213,12 @@ if ($cxx.target.class != 'windows')
info: package libhello is now broken; use 'pkg-purge' to remove
EOE
- $pkg_status libhello >'broken 1.0.0';
+ $pkg_status libhello >'libhello broken 1.0.0';
chmod 755 cfg/libhello;
rm -r cfg/libhello;
$pkg_purge -f libhello 2>'purged libhello/1.0.0';
- $pkg_status libhello >'unknown'
+ $pkg_status libhello >'libhello unknown'
}
: configure-failed
@@ -235,7 +235,7 @@ if ($cxx.target.class != 'windows')
%error: unable to create directory cfg/libhello/build/.+%
EOE
- $pkg_status libhello >'unpacked 1.0.0'
+ $pkg_status libhello >'libhello unpacked 1.0.0'
}
: configure-disfigure-failed
@@ -254,12 +254,12 @@ if ($cxx.target.class != 'windows')
info: package libhello is now broken; use 'pkg-purge' to remove
EOE
- $pkg_status libhello >'broken 1.0.0';
+ $pkg_status libhello >'libhello broken 1.0.0';
chmod 755 cfg/libhello cfg/libhello/build;
rm -r cfg/libhello;
$pkg_purge -f libhello 2>'purged libhello/1.0.0';
- $pkg_status libhello >'unknown'
+ $pkg_status libhello >'libhello unknown'
}
}
@@ -278,7 +278,7 @@ if ($cxx.target.class != 'windows')
error: no configured package satisfies dependency on libfoo
EOE
- $pkg_status libbar/1.0.0 1>'unpacked; available';
+ $pkg_status libbar/1.0.0 1>'libbar unpacked 1.0.0';
$pkg_fetch libfoo/1.0.0;
$pkg_unpack libfoo;
diff --git a/tests/pkg-drop.test b/tests/pkg-drop.test
index 2fb616e..f7666b5 100644
--- a/tests/pkg-drop.test
+++ b/tests/pkg-drop.test
@@ -220,9 +220,9 @@ $* libfoo/1.0.0 2>>~%EOE% != 0
purged libfoo
EOE
- -$pkg_status libbar/1.1.0 >'unknown'
- -$pkg_status libbaz/1.1.0 >'available'
- -$pkg_status libfoo/1.1.0 >'available'
+ -$pkg_status libbar/1.1.0 >'libbar available [1.1.0]'
+ -$pkg_status libbaz/1.1.0 >'libbaz available 1.1.0'
+ -$pkg_status libfoo/1.1.0 >'libfoo available [1.1.0]'
}
: prerequisites-and-dependents
@@ -368,11 +368,11 @@ $* libfoo/1.0.0 2>>~%EOE% != 0
purged libfox
EOE
- -$pkg_status libfox/1.0.0 >'available'
- -$pkg_status libfoo/1.1.0 >'available'
- -$pkg_status libbar/1.1.0 >'unknown'
- -$pkg_status libbaz/1.1.0 >'available'
- -$pkg_status libbiz/1.0.0 >'available'
+ -$pkg_status libfox/1.0.0 >'libfox available 1.0.0'
+ -$pkg_status libfoo/1.1.0 >'libfoo available [1.1.0]'
+ -$pkg_status libbar/1.1.0 >'libbar available [1.1.0]'
+ -$pkg_status libbaz/1.1.0 >'libbaz available 1.1.0'
+ -$pkg_status libbiz/1.0.0 >'libbiz available 1.0.0'
}
: keep-drop-options
@@ -424,7 +424,7 @@ $* libfoo/1.0.0 2>>~%EOE% != 0
purged libbar
EOE
- $pkg_status libfoo >'configured 1.1.0';
+ $pkg_status libfoo >'libfoo configured 1.1.0';
$* libfoo 2>>EOE
disfigured libfoo
@@ -442,7 +442,7 @@ $* libfoo/1.0.0 2>>~%EOE% != 0
$pkg_build libfoo;
$* --disfigure-only libfoo 2>'disfigured libfoo';
- $pkg_status libfoo >'unpacked 1.1.0 hold_package; available sys:?';
+ $pkg_status libfoo >'!libfoo unpacked 1.1.0';
$* libfoo 2>'purged libfoo'
}
diff --git a/tests/pkg-fetch.test b/tests/pkg-fetch.test
index 919db7d..f7b8be2 100644
--- a/tests/pkg-fetch.test
+++ b/tests/pkg-fetch.test
@@ -123,7 +123,7 @@ $* libfoo/1.0.0 2>>/EOE != 0
%.*fetched libfoo/1.0.0%
EOE
- $pkg_status libfoo/1.0.0 1>'fetched; available';
+ $pkg_status libfoo/1.0.0 1>'libfoo fetched 1.0.0';
$* libfoo/1.0.0 2>>/EOE != 0;
error: package libfoo already exists in configuration cfg/
@@ -146,7 +146,7 @@ $* libfoo/1.0.0 2>>/EOE != 0
$clone_cfg;
$* -e $src/t1/libfoo-1.0.0.tar.gz 2>'using libfoo/1.0.0 (external)';
- $pkg_status libfoo/1.0.0 1>'fetched; available';
+ $pkg_status libfoo/1.0.0 1>'libfoo fetched 1.0.0';
$pkg_unpack libfoo 2>'unpacked libfoo/1.0.0';
test.arguments += --replace; # Replace existing package.
@@ -156,19 +156,19 @@ $* libfoo/1.0.0 2>>/EOE != 0
%.*fetched libfoo/1.1.0%
EOE
- $pkg_status libfoo/1.1.0 1>'fetched; available';
+ $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>'fetched; available';
+ $pkg_status libfoo/1.0.0 1>'libfoo fetched 1.0.0';
$* libfoo/1.1.0 2>>~%EOE%;
%.*
%.*fetched libfoo/1.1.0%
EOE
- $pkg_status libfoo/1.1.0 1>'fetched; available';
+ $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)';
- $pkg_status libfoo/1.0.0 1>'fetched; available';
+ $pkg_status libfoo/1.0.0 1>'libfoo fetched 1.0.0';
$pkg_purge libfoo 2>'purged libfoo/1.0.0'
}
@@ -197,7 +197,7 @@ $* libfoo/1.0.0 2>>/EOE != 0
%.*fetched libhello/1.0.0%
EOE
- $pkg_status libhello/1.0.0 1>'fetched; available';
+ $pkg_status libhello/1.0.0 1>'libhello fetched 1.0.0';
$pkg_purge libhello 2>'purged libhello/1.0.0'
}
diff --git a/tests/pkg-purge.test b/tests/pkg-purge.test
index 6185665..b4ccc32 100644
--- a/tests/pkg-purge.test
+++ b/tests/pkg-purge.test
@@ -39,7 +39,7 @@ $* libfoo 2>>/EOE != 0
$clone_cfg && $pkg_fetch -e $src/libfoo-1.0.0.tar.gz;
$* libfoo 2>'purged libfoo/1.0.0';
- $pkg_status libfoo 1>'unknown'
+ $pkg_status libfoo 1>'libfoo unknown'
}
: keep
@@ -48,7 +48,7 @@ $* libfoo 2>>/EOE != 0
$clone_cfg && $pkg_fetch -e $src/libfoo-1.0.0.tar.gz;
$* -k libfoo 2>'keeping archive libfoo/1.0.0';
- $pkg_status libfoo 1>'fetched 1.0.0';
+ $pkg_status libfoo 1>'libfoo fetched 1.0.0';
$* libfoo 2>'purged libfoo/1.0.0'
}
@@ -60,7 +60,7 @@ $* libfoo 2>>/EOE != 0
$pkg_fetch -e -p cfg/libfoo-1.0.0.tar.gz;
$* libfoo 2>'purged libfoo/1.0.0';
- $pkg_status libfoo 1>'unknown';
+ $pkg_status libfoo 1>'libfoo unknown';
test -f cfg/libfoo-1.0.0.tar.gz == 1
}
@@ -73,7 +73,7 @@ $* libfoo 2>>/EOE != 0
error: package libfoo has no archive to keep
EOE
- $pkg_status libfoo 1>'unpacked 1.1.0';
+ $pkg_status libfoo 1>'libfoo unpacked 1.1.0';
$* libfoo 2>'purged libfoo/1.1.0'
}
@@ -83,7 +83,7 @@ $* libfoo 2>>/EOE != 0
$clone_cfg && $pkg_unpack -e $src/libfoo-1.1.0;
$* libfoo 2>'purged libfoo/1.1.0';
- $pkg_status libfoo 1>'unknown'
+ $pkg_status libfoo 1>'libfoo unknown'
}
: unpacked-archive
@@ -93,7 +93,7 @@ $* libfoo 2>>/EOE != 0
$pkg_fetch -e $src/libfoo-1.0.0.tar.gz && $pkg_unpack libfoo;
$* libfoo 2>'purged libfoo/1.0.0';
- $pkg_status libfoo 1>'unknown';
+ $pkg_status libfoo 1>'libfoo unknown';
test -d cfg/libfoo-1.0.0 == 1
}
@@ -104,10 +104,10 @@ $* libfoo 2>>/EOE != 0
$pkg_fetch -e $src/libfoo-1.0.0.tar.gz && $pkg_unpack libfoo;
$* --keep libfoo 2>'keeping archive libfoo/1.0.0';
- $pkg_status libfoo 1>'fetched 1.0.0';
+ $pkg_status libfoo 1>'libfoo fetched 1.0.0';
test -d cfg/libfoo-1.0.0 == 1;
$* libfoo 2>'purged libfoo/1.0.0';
- $pkg_status libfoo 1>'unknown'
+ $pkg_status libfoo 1>'libfoo unknown'
}
: purge-dir
@@ -119,7 +119,7 @@ $* libfoo 2>>/EOE != 0
$pkg_unpack -e -p cfg/libfoo-1.1.0;
$* libfoo 2>'purged libfoo/1.1.0';
- $pkg_status libfoo 1>'unknown';
+ $pkg_status libfoo 1>'libfoo unknown';
test -d cfg/libfoo-1.1.0 == 1
}
@@ -131,7 +131,7 @@ $* libfoo 2>>/EOE != 0
$pkg_fetch -e -p cfg/libfoo-1.0.0.tar.gz && $pkg_unpack libfoo;
$* libfoo 2>'purged libfoo/1.0.0';
- $pkg_status libfoo 1>'unknown';
+ $pkg_status libfoo 1>'libfoo unknown';
test -d cfg/libfoo-1.0.0 == 1;
test -f cfg/libfoo-1.0.0.tar.gz == 1
}
@@ -151,17 +151,17 @@ if ($cxx.target.class != 'windows')
info: package libfoo is now broken; use 'pkg-purge --force' to remove
EOE
- $pkg_status libfoo/1.0.0 >'broken';
+ $pkg_status libfoo/1.0.0 >'libfoo broken 1.0.0';
$* -f -k libfoo 2>'error: cannot keep broken package libfoo' != 0;
- $pkg_status libfoo/1.0.0 >'broken';
+ $pkg_status libfoo/1.0.0 >'libfoo broken 1.0.0';
$* -f libfoo 2>>/EOE != 0;
error: source directory of broken package libfoo still exists
info: remove cfg/libfoo-1.0.0/ manually then re-run pkg-purge
EOE
- $pkg_status libfoo/1.0.0 >'broken';
+ $pkg_status libfoo/1.0.0 >'libfoo broken 1.0.0';
chmod 755 cfg/libfoo-1.0.0;
rm -r cfg/libfoo-1.0.0;
@@ -173,5 +173,5 @@ if ($cxx.target.class != 'windows')
rm cfg/libfoo-1.0.0.tar.gz;
$* -f libfoo 2>'purged libfoo/1.0.0';
- $pkg_status libfoo >'unknown'
+ $pkg_status libfoo >'libfoo unknown'
}
diff --git a/tests/pkg-status.test b/tests/pkg-status.test
index 8d3fc36..d59121f 100644
--- a/tests/pkg-status.test
+++ b/tests/pkg-status.test
@@ -70,12 +70,12 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
: libfoo-1.0.0
:
$clone_cfg;
- $* libfoo/1.0.0 >'unknown'
+ $* libfoo/1.0.0 >'libfoo unknown 1.0.0'
: libfoo
:
$clone_cfg;
- $* libfoo >'unknown'
+ $* libfoo >'libfoo unknown'
}
: rep-fetched
@@ -89,12 +89,12 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
: libfoo-1.0.0
:
$clone_cfg;
- $* libfoo/1.0.0 >'available'
+ $* libfoo/1.0.0 >'libfoo available 1.0.0'
: libfoo
:
$clone_cfg;
- $* libfoo >'available 1.0.0 sys:?'
+ $* libfoo >'libfoo available 1.0.0'
: pkg-fetched
:
@@ -104,12 +104,12 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
: libfoo-1.0.0
:
$clone_cfg;
- $* libfoo/1.0.0 >'fetched; available'
+ $* libfoo/1.0.0 >'libfoo fetched 1.0.0'
: libfoo
:
$clone_cfg;
- $* libfoo >'fetched 1.0.0; available sys:?'
+ $* libfoo >'libfoo fetched 1.0.0'
}
}
}
@@ -134,11 +134,11 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
: libbar
:
- $* -d ../extra libbar >'available 1.1.0+1 sys:?'
+ $* -d ../extra libbar >'libbar available 1.1.0+1 [1.0.0]'
: libbar-stable
:
- $* -d ../extra-stable libbar >'available 1.1.0+1 1.0.0 sys:?'
+ $* -d ../extra-stable libbar >'libbar available 1.1.0+1 1.0.0'
}
: testing
@@ -146,7 +146,7 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
{
$clone_cfg ./ && $rep_add $rep/testing && $rep_fetch;
- $* libbar >'available 1.1.0 1.0.0+1 1.0.0 sys:?'
+ $* libbar >'libbar available [1.1.0+1] 1.1.0 1.0.0+1 1.0.0'
}
: unstable
@@ -166,15 +166,15 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
: not-fetched
:
- $* -d ../cfg libbar >'available 2.0.0 1.1.0 1.0.0+1 1.0.0 sys:?'
+ $* -d ../cfg libbar >'libbar available 2.0.0 [1.1.0+1] 1.1.0 1.0.0+1 1.0.0'
: fetched-1
:
- $* -d ../fetched1 libbar >'fetched 1.0.0+1; available 2.0.0 1.1.0 sys:?'
+ $* -d ../fetched1 libbar >'libbar fetched 1.0.0+1 available 2.0.0 [1.1.0+1] 1.1.0'
: fetched-2
:
- $* -d ../fetched2 libbar >'fetched 2.0.0; available sys:?'
+ $* -d ../fetched2 libbar >'libbar fetched 2.0.0'
}
}
@@ -195,9 +195,9 @@ else
: Make sure that we properly handle the root<->style repository dependency
: cycle while searching for the style-basic package, that is an available
: package but not from the user-added repository (or its complement), and so
- : is not visible for the status command. Note that the root repository is the
- : default complement for git repositories (see rep_fetch() implementation for
- : the reasoning).
+ : is not detected as buildable by the status command. Note that the root
+ : repository is the default complement for git repositories (see rep_fetch()
+ : implementation for the reasoning).
:
$clone_root_cfg;
$rep_add "$rep/libbar.git#master" && $rep_add "$rep/style.git#master";
@@ -208,5 +208,5 @@ else
$rep_fetch 2>&1 | \
sed -e 's/warning: (fetching (over|whole) .*)/info: \1/' >&2 2>!;
- $* style-basic >'unknown'
+ $* style-basic >~'%style-basic available \[1\.1\.0-a\.0\..+\]%'
}
diff --git a/tests/pkg-system.test b/tests/pkg-system.test
index 1344cbf..271921c 100644
--- a/tests/pkg-system.test
+++ b/tests/pkg-system.test
@@ -114,8 +114,8 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
# Build sys:libbar/*.
#
$pkg_build 'sys:libbar' 2>'configured sys:libbar/*';
- $pkg_status libbar 1>'configured,system * hold_package hold_version; available 2 1 sys:?';
- $pkg_status libbaz 1>'available 2 sys:?';
+ $pkg_status libbar 1>'!libbar configured,system !* available 2 1';
+ $pkg_status libbaz 1>'libbaz available 2';
# Build foo with preconfigured sys:libbar/*.
#
@@ -128,9 +128,9 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
updated foo/2
EOE
- $pkg_status foo >'configured 2 hold_package; available sys:?';
- $pkg_status libbar >'configured,system * hold_package hold_version; available 2 1 sys:?';
- $pkg_status libbaz >'available 2 sys:?';
+ $pkg_status foo >'!foo configured 2';
+ $pkg_status libbar >'!libbar configured,system !* available 2 1';
+ $pkg_status libbaz >'libbaz available 2';
# Reconfigure sys:libbar/* to 2.
#
@@ -143,9 +143,9 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
updated foo/2
EOE
- $pkg_status foo >'configured 2 hold_package; available sys:?';
- $pkg_status libbar >'configured,system 2 hold_package hold_version; available sys:?';
- $pkg_status libbaz >'available 2 sys:?';
+ $pkg_status foo >'!foo configured 2';
+ $pkg_status libbar >'!libbar configured,system !2';
+ $pkg_status libbaz >'libbaz available 2';
# Reconfigure sys:libbar/2 to libbar/2.
#
@@ -167,9 +167,9 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
updated foo/2
EOE
- $pkg_status foo >'configured 2 hold_package; available sys:?';
- $pkg_status libbar >'configured 2 hold_package hold_version; available sys:?';
- $pkg_status libbaz >'configured 2; available sys:?';
+ $pkg_status foo >'!foo configured 2';
+ $pkg_status libbar >'!libbar configured !2';
+ $pkg_status libbaz >'libbaz configured 2';
$pkg_drop foo libbar
}
@@ -191,9 +191,9 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
updated foo/2
EOE
- $pkg_status foo >'configured 2 hold_package; available sys:?';
- $pkg_status libbar >'configured,system 2 hold_package hold_version; available sys:?';
- $pkg_status libbaz >'available 2 sys:?';
+ $pkg_status foo >'!foo configured 2';
+ $pkg_status libbar >'!libbar configured,system !2';
+ $pkg_status libbaz >'libbaz available 2';
$pkg_drop foo libbar
}
@@ -215,9 +215,9 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
updated foo/2
EOE
- $pkg_status foo >'configured 2 hold_package; available sys:?';
- $pkg_status libbar >'configured,system 2 hold_package hold_version; available sys:?';
- $pkg_status libbaz >'available 2 sys:?';
+ $pkg_status foo >'!foo configured 2';
+ $pkg_status libbar >'!libbar configured,system !2';
+ $pkg_status libbaz >'libbaz available 2';
$pkg_drop foo libbar
}
@@ -244,8 +244,8 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
updated libbar/2
EOE
- $pkg_status libbar >'configured 2 hold_package hold_version; available sys:?';
- $pkg_status libbaz >'configured 2; available sys:?';
+ $pkg_status libbar >'!libbar configured !2';
+ $pkg_status libbaz >'libbaz configured 2';
# Build foo and sys:libbar/2.
#
@@ -263,9 +263,9 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
updated foo/2
EOE
- $pkg_status foo >'configured 2 hold_package; available sys:?';
- $pkg_status libbar >'configured,system 2 hold_package hold_version; available sys:?';
- $pkg_status libbaz >'available 2 sys:?';
+ $pkg_status foo >'!foo configured 2';
+ $pkg_status libbar >'!libbar configured,system !2';
+ $pkg_status libbaz >'libbaz available 2';
$pkg_drop foo libbar
}
@@ -292,8 +292,8 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
updated libbar/2
EOE
- $pkg_status libbar >'configured 2 hold_package hold_version; available sys:?';
- $pkg_status libbaz >'configured 2; available sys:?';
+ $pkg_status libbar >'!libbar configured !2';
+ $pkg_status libbaz >'libbaz configured 2';
# Build foo and sys:libbar.
#
@@ -311,9 +311,9 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
updated foo/2
EOE
- $pkg_status foo >'configured 2 hold_package; available sys:?';
- $pkg_status libbar >'configured,system * hold_package hold_version; available 2 1 sys:?';
- $pkg_status libbaz >'available 2 sys:?';
+ $pkg_status foo >'!foo configured 2';
+ $pkg_status libbar >'!libbar configured,system !* available 2 1';
+ $pkg_status libbaz >'libbaz available 2';
$pkg_drop foo libbar
}
@@ -329,7 +329,7 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
# Build sys:libbar/2.
#
$pkg_build 'sys:libbar/2' 2>'configured sys:libbar/2';
- $pkg_status libbar >'configured,system 2 hold_package hold_version; available sys:?';
+ $pkg_status libbar >'!libbar configured,system !2';
# Build foo and libbar/2.
#
@@ -353,9 +353,9 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
updated foo/2
EOE
- $pkg_status foo >'configured 2 hold_package; available sys:?';
- $pkg_status libbar >'configured 2 hold_package hold_version; available sys:?';
- $pkg_status libbaz >'configured 2; available sys:?';
+ $pkg_status foo >'!foo configured 2';
+ $pkg_status libbar >'!libbar configured !2';
+ $pkg_status libbaz >'libbaz configured 2';
# Build sys:libbar/2.
#
@@ -371,9 +371,9 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
updated foo/2
EOE
- $pkg_status foo >'configured 2 hold_package; available sys:?';
- $pkg_status libbar >'configured,system 2 hold_package hold_version; available sys:?';
- $pkg_status libbaz >'available 2 sys:?';
+ $pkg_status foo >'!foo configured 2';
+ $pkg_status libbar >'!libbar configured,system !2';
+ $pkg_status libbaz >'libbaz available 2';
# Build libbar/2.
#
@@ -395,9 +395,9 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
updated foo/2
EOE
- $pkg_status foo >'configured 2 hold_package; available sys:?';
- $pkg_status libbar >'configured 2 hold_package hold_version; available sys:?';
- $pkg_status libbaz >'configured 2; available sys:?';
+ $pkg_status foo >'!foo configured 2';
+ $pkg_status libbar >'!libbar configured !2';
+ $pkg_status libbaz >'libbaz configured 2';
$pkg_drop foo libbar
}
@@ -413,8 +413,8 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
# Build sys:libbar/1.
#
$pkg_build 'sys:libbar/1' 2>'configured sys:libbar/1';
- $pkg_status libbar 1>'configured,system 1 hold_package hold_version; available 2 sys:?';
- $pkg_status libbaz 1>'available 2 sys:?';
+ $pkg_status libbar 1>'!libbar configured,system !1 available 2';
+ $pkg_status libbaz 1>'libbaz available 2';
# Fail to build foo.
#
@@ -447,9 +447,9 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
updated foo/2
EOE
- $pkg_status foo >'configured 2 hold_package; available sys:?';
- $pkg_status libbar >'configured 2 hold_package; available sys:?';
- $pkg_status libbaz >'configured 2; available sys:?';
+ $pkg_status foo >'!foo configured 2';
+ $pkg_status libbar >'!libbar configured 2';
+ $pkg_status libbaz >'libbaz configured 2';
$pkg_drop foo libbar
}
@@ -471,9 +471,9 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
updated foo/2
EOE
- $pkg_status foo >'configured 2 hold_package; available sys:?';
- $pkg_status libbar >'configured,system *; available 2 1 sys:?';
- $pkg_status libbaz >'available 2 sys:?';
+ $pkg_status foo >'!foo configured 2';
+ $pkg_status libbar >'libbar configured,system * available 2 1';
+ $pkg_status libbaz >'libbaz available 2';
$pkg_drop foo libbar
}
@@ -501,8 +501,8 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
updated libbar/1
EOE
- $pkg_status libbar >'configured 1 hold_package hold_version; available 2 sys:?';
- $pkg_status libbaz >'configured 2; available sys:?';
+ $pkg_status libbar >'!libbar configured !1 available 2';
+ $pkg_status libbaz >'libbaz configured 2';
# Fail to build foo.
#
@@ -529,9 +529,9 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
updated foo/2
EOE
- $pkg_status foo >'configured 2 hold_package; available sys:?';
- $pkg_status libbar >'configured,system 2 hold_package hold_version; available sys:?';
- $pkg_status libbaz >'available 2 sys:?';
+ $pkg_status foo >'!foo configured 2';
+ $pkg_status libbar >'!libbar configured,system !2';
+ $pkg_status libbaz >'libbaz available 2';
# Build foo and sys:libbar/2.
#
@@ -540,9 +540,9 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
updated foo/2
EOE
- $pkg_status foo >'configured 2 hold_package; available sys:?';
- $pkg_status libbar >'configured,system 2 hold_package hold_version; available sys:?';
- $pkg_status libbaz >'available 2 sys:?';
+ $pkg_status foo >'!foo configured 2';
+ $pkg_status libbar >'!libbar configured,system !2';
+ $pkg_status libbaz >'libbaz available 2';
$pkg_drop foo libbar
}
@@ -572,8 +572,8 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
info: specify sys:libbar if it is available from the system
EOE
- $pkg_status foo >'available 2 sys:?';
- $pkg_status libbar >'available sys:?'
+ $pkg_status foo >'foo available 2';
+ $pkg_status libbar >'libbar unknown'
}
: foo-syslibbar
@@ -593,8 +593,8 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
updated foo/2
EOE
- $pkg_status foo >'configured 2 hold_package; available sys:?';
- $pkg_status libbar >'configured,system * hold_package hold_version; available sys:?';
+ $pkg_status foo >'!foo configured 2';
+ $pkg_status libbar >'!libbar configured,system !*';
$pkg_drop foo libbar
}
@@ -610,7 +610,7 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
# Build sys:libbar/1.
#
$pkg_build 'sys:libbar/1' 2>'configured sys:libbar/1';
- $pkg_status libbar 1>'configured,system 1 hold_package hold_version; available sys:?';
+ $pkg_status libbar 1>'!libbar configured,system !1';
# Fail to build foo.
#
@@ -633,8 +633,8 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
updated foo/2
EOE
- $pkg_status foo >'configured 2 hold_package; available sys:?';
- $pkg_status libbar >'configured,system 2 hold_package hold_version; available sys:?';
+ $pkg_status foo >'!foo configured 2';
+ $pkg_status libbar >'!libbar configured,system !2';
$pkg_drop foo libbar
}
@@ -658,7 +658,7 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
# Build sys:libbar/2.
#
$pkg_build 'sys:libbar/2' 2>'configured sys:libbar/2';
- $pkg_status libbar 1>'configured,system 2 hold_package hold_version; available sys:?';
+ $pkg_status libbar 1>'!libbar configured,system !2';
# Still fail to build foo and sys:libbar/1.
#
@@ -686,7 +686,7 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
# Build sys:libbar/2.
#
$pkg_build 'sys:libbar/1' 2>'configured sys:libbar/1';
- $pkg_status libbar 1>'configured,system 1 hold_package hold_version; available sys:?';
+ $pkg_status libbar 1>'!libbar configured,system !1';
# Fail to build sys:libbar/1.1 and foo.
#
@@ -719,8 +719,8 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
updated foo/2
EOE
- $pkg_status foo >'configured 2 hold_package; available sys:?';
- $pkg_status libbar >'configured,system *; available sys:?';
+ $pkg_status foo >'!foo configured 2';
+ $pkg_status libbar >'libbar configured,system *';
# Drop foo.
#
@@ -730,8 +730,8 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
purged foo
EOE
- $pkg_status foo >'available 2 sys:?';
- $pkg_status libbar >'available sys:?'
+ $pkg_status foo >'foo available 2';
+ $pkg_status libbar --system >'libbar available sys:?'
}
: syslibbar1-foo-syslibbar-drop-foo
@@ -745,7 +745,7 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
# Build sys:libbar/1.
#
$pkg_build 'sys:libbar/1' 2>'configured sys:libbar/1';
- $pkg_status libbar 1>'configured,system 1 hold_package hold_version; available sys:?';
+ $pkg_status libbar 1>'!libbar configured,system !1';
# Fail to build foo.
#
@@ -768,8 +768,8 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
updated foo/2
EOE
- $pkg_status foo >'configured 2 hold_package; available sys:?';
- $pkg_status libbar >'configured,system 2 hold_package hold_version; available sys:?';
+ $pkg_status foo >'!foo configured 2';
+ $pkg_status libbar >'!libbar configured,system !2';
# Drop foo.
#
@@ -778,8 +778,8 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
purged foo
EOE
- $pkg_status foo >'available 2 sys:?';
- $pkg_status libbar >'configured,system 2 hold_package hold_version; available sys:?'
+ $pkg_status foo >'foo available 2';
+ $pkg_status libbar >'!libbar configured,system !2'
}
}
@@ -816,8 +816,8 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
info: while satisfying foo/2
EOE
- $pkg_status foo >'available 2 sys:?';
- $pkg_status libbar >'unknown'
+ $pkg_status foo >'foo available 2';
+ $pkg_status libbar >'libbar unknown'
}
: syslibbar1-foo-syslibbar-drop-foo
@@ -841,16 +841,16 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
updated foo/2
EOE
- $pkg_status foo >'configured 2 hold_package; available sys:?';
- $pkg_status libbar >'configured,system 2';
+ $pkg_status foo >'!foo configured 2';
+ $pkg_status libbar >'libbar configured,system 2';
# Fail as libbar while being selected is still unknown (not present in t3
# repo).
#
$pkg_build 'sys:libbar' 2>'error: unknown package libbar' != 0;
$pkg_build foo 'sys:libbar' 2>'error: unknown package libbar' != 0;
- $pkg_status foo 1>'configured 2 hold_package; available sys:?';
- $pkg_status libbar 1>'configured,system 2';
+ $pkg_status foo 1>'!foo configured 2';
+ $pkg_status libbar 1>'libbar configured,system 2';
# Build foo and ?sys:libbar/3. Note that libbar stays as system version 2.
#
@@ -859,8 +859,8 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
updated foo/2
EOE
- $pkg_status foo >'configured 2 hold_package; available sys:?';
- $pkg_status libbar >'configured,system 2';
+ $pkg_status foo >'!foo configured 2';
+ $pkg_status libbar >'libbar configured,system 2';
# Build foo and ?sys:libbar.
#
@@ -869,8 +869,8 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
updated foo/2
EOE
- $pkg_status foo >'configured 2 hold_package; available sys:?';
- $pkg_status libbar >'configured,system 2';
+ $pkg_status foo >'!foo configured 2';
+ $pkg_status libbar >'libbar configured,system 2';
$pkg_drop foo
}
diff --git a/tests/pkg-unpack.test b/tests/pkg-unpack.test
index e4cff16..a518f01 100644
--- a/tests/pkg-unpack.test
+++ b/tests/pkg-unpack.test
@@ -108,7 +108,7 @@ $* 2>>EOE != 0
$pkg_purge libfoo 2>'purged libfoo/1.0.0';
$* -e $src/libfoo-1.1.0 2>'using libfoo/1.1.0 (external)';
- $pkg_status libfoo/1.1.0 1>'unpacked; available';
+ $pkg_status libfoo/1.1.0 1>'libfoo unpacked 1.1.0';
$pkg_configure libfoo 2>'configured libfoo/1.1.0';
test -d cfg/libfoo;
@@ -129,7 +129,7 @@ $* 2>>EOE != 0
EOE
$* -r -e $src/libfoo-1.1.0 2>'using libfoo/1.1.0 (external)';
- $pkg_status libfoo/1.1.0 1>'unpacked; available';
+ $pkg_status libfoo/1.1.0 1>'libfoo unpacked 1.1.0';
$pkg_purge libfoo 2>'purged libfoo/1.1.0'
}
@@ -148,7 +148,7 @@ $* 2>>EOE != 0
EOE
$* -r -e $src/libfoo-1.1.0 2>'using libfoo/1.1.0 (external)';
- $pkg_status libfoo/1.1.0 1>'unpacked; available';
+ $pkg_status libfoo/1.1.0 1>'libfoo unpacked 1.1.0';
$pkg_purge libfoo 2>'purged libfoo/1.1.0'
}
@@ -177,9 +177,9 @@ $* 2>>EOE != 0
{
$clone_cfg && $pkg_fetch libfoo/1.0.0;
- $pkg_status libfoo/1.0.0 1>'fetched; available';
+ $pkg_status libfoo/1.0.0 1>'libfoo fetched 1.0.0';
$* libfoo 2>'unpacked libfoo/1.0.0';
- $pkg_status libfoo/1.0.0 1>'unpacked; available';
+ $pkg_status libfoo/1.0.0 1>'libfoo unpacked 1.0.0';
$pkg_configure libfoo 2>'configured libfoo/1.0.0';
test -d cfg/libfoo-1.0.0;
@@ -256,7 +256,7 @@ $* 2>>EOE != 0
using libfoo/1.1.0 (external)
EOE
- $pkg_status libfoo 1>'unpacked 1.1.0; available sys:?';
+ $pkg_status libfoo 1>'libfoo unpacked 1.1.0';
$pkg_configure libfoo 2>'configured libfoo/1.1.0';
test -d cfg/libfoo;
diff --git a/tests/rep-auth.test b/tests/rep-auth.test
index addaad3..0cf3fcf 100644
--- a/tests/rep-auth.test
+++ b/tests/rep-auth.test
@@ -129,8 +129,8 @@ rep_fetch += -d cfg
# Check if rep-fetch command was successfull or not.
#
-fetched = $pkg_status foo >'available 1 sys:?'
-not_fetched = $pkg_status foo >'unknown'
+fetched = $pkg_status foo >'foo available 1'
+not_fetched = $pkg_status foo >'foo unknown'
sc = " " # Space character to append to here-document line when required.
diff --git a/tests/rep-fetch.test b/tests/rep-fetch.test
index 535627d..dcbf1d7 100644
--- a/tests/rep-fetch.test
+++ b/tests/rep-fetch.test
@@ -455,7 +455,7 @@ if ($remote != true)
$* 2>!;
- $pkg_status libhello >'unpacked 1.0.0; available 1.0.0#1 sys:?'
+ $pkg_status libhello >'libhello unpacked 1.0.0 available 1.0.0#1'
}
: manifest-changed
@@ -471,7 +471,7 @@ if ($remote != true)
echo "" >+ libhello/manifest;
$* 2>!;
- $pkg_status libhello >'unpacked 1.0.0; available 1.0.0#1 sys:?'
+ $pkg_status libhello >'libhello unpacked 1.0.0 available 1.0.0#1'
}
: pkg-rep
@@ -488,7 +488,7 @@ if ($remote != true)
$clone_cfg && $rep_add $src/libhello-1.0.0;
$* 2>!;
- $pkg_status libhello >'unpacked 1.0.0; available sys:?'
+ $pkg_status libhello >'libhello unpacked 1.0.0'
}
: changed-external
@@ -500,7 +500,7 @@ if ($remote != true)
$clone_cfg && $rep_add libhello;
$* 2>!;
- $pkg_status libhello >'unpacked 1.0.0; available 1.0.0#1 sys:?'
+ $pkg_status libhello >'libhello unpacked 1.0.0 available 1.0.0#1'
}
-$pkg_purge libhello 2>'purged libhello/1.0.0'
@@ -520,7 +520,7 @@ if ($remote != true)
$rep_add $rep/style.git;
$* 2>!;
- $pkg_status style >"unpacked 1.0.0; available sys:?";
+ $pkg_status style >"style unpacked 1.0.0";
$pkg_purge style 2>"purged style/1.0.0"
}
@@ -540,7 +540,7 @@ if ($remote != true)
1 package(s) in 1 repository(s)
EOE
- $pkg_status libhello >'unpacked 1.0.0; available sys:?'
+ $pkg_status libhello >'libhello unpacked 1.0.0'
}
}
@@ -639,6 +639,6 @@ else
info: run 'bpkg rep-fetch' to update
EOE
- $pkg_status libfoo >'unknown'
+ $pkg_status libfoo >'libfoo unknown'
}
}
diff --git a/tests/rep-remove.test b/tests/rep-remove.test
index 01e91d4..7e7b5b4 100644
--- a/tests/rep-remove.test
+++ b/tests/rep-remove.test
@@ -103,7 +103,7 @@ pkg_status += -d cfg
pkg:build2.org/rep-remove/extra ($rep/extra)
EOE
- $pkg_status libbar >'unknown'
+ $pkg_status libbar >'libbar unknown'
}
: all
@@ -117,7 +117,7 @@ pkg_status += -d cfg
EOE
$rep_list >:"";
- $pkg_status libbar >'unknown'
+ $pkg_status libbar >'libbar unknown'
}
: by-name
@@ -131,7 +131,7 @@ pkg_status += -d cfg
EOE
$rep_list >:"";
- $pkg_status libbar >'unknown'
+ $pkg_status libbar >'libbar unknown'
}
: prerequisites-cycle
@@ -145,8 +145,8 @@ pkg_status += -d cfg
EOE
$rep_list >:"";
- $pkg_status libbar >'unknown';
- $pkg_status libfoo >'unknown'
+ $pkg_status libbar >'libbar unknown';
+ $pkg_status libfoo >'libfoo unknown'
}
: reacheable
@@ -166,8 +166,8 @@ pkg_status += -d cfg
prerequisite pkg:build2.org/rep-remove/math ($rep/math)
EOO
- $pkg_status libbar >'available 1.0.0 sys:?';
- $pkg_status libfoo >'unknown'
+ $pkg_status libbar >'libbar available [1.1.0+1] 1.0.0';
+ $pkg_status libfoo >'libfoo available [1.0.0]'
}
: package-locations
@@ -177,10 +177,10 @@ pkg_status += -d cfg
$rep_add $rep/testing && $rep_add $rep/alpha && $rep_fetch;
$* $rep/testing 2>!;
- $pkg_status libbar >'available 2.0.0 sys:?';
+ $pkg_status libbar >'libbar available 2.0.0';
$* $rep/alpha 2>!;
- $pkg_status libbar >'unknown'
+ $pkg_status libbar >'libbar unknown'
}
: git-rep