aboutsummaryrefslogtreecommitdiff
path: root/bpkg/pkg-build.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'bpkg/pkg-build.cxx')
-rw-r--r--bpkg/pkg-build.cxx20
1 files changed, 18 insertions, 2 deletions
diff --git a/bpkg/pkg-build.cxx b/bpkg/pkg-build.cxx
index 0628f6f..07e23be 100644
--- a/bpkg/pkg-build.cxx
+++ b/bpkg/pkg-build.cxx
@@ -1705,12 +1705,13 @@ namespace bpkg
optional<const system_package_status*> os (
spm.pkg_status (nm, nullptr));
+ available_packages aps;
if (!os)
{
// If no cache hit, then collect the available packages for the
// mapping information.
//
- available_packages aps (find_available_all (current_configs, nm));
+ aps = find_available_all (current_configs, nm);
// If no source/stub for the package (and thus no mapping), issue
// diagnostics consistent with other such places.
@@ -1718,9 +1719,24 @@ namespace bpkg
if (aps.empty ())
fail << "unknown package " << nm <<
info << "consider specifying " << nm << "/*";
+ }
- os = spm.pkg_status (nm, &aps);
+ // This covers both our diagnostics below as well as anything that
+ // might be issued by pkg_status().
+ //
+ auto df = make_diag_frame (
+ [&nm] (diag_record& dr)
+ {
+ dr << info << "specify " << nm << "/* if package is not "
+ << "installed with system package manager";
+ dr << info << "specify --sys-no-query to disable system "
+ << "package manager interaction";
+ });
+
+ if (!os)
+ {
+ os = spm.pkg_status (nm, &aps);
assert (os);
}