aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bpkg/package-skeleton.cxx2
-rw-r--r--bpkg/pkg-build.cxx27
2 files changed, 18 insertions, 11 deletions
diff --git a/bpkg/package-skeleton.cxx b/bpkg/package-skeleton.cxx
index eaebf26..9e2ce0d 100644
--- a/bpkg/package-skeleton.cxx
+++ b/bpkg/package-skeleton.cxx
@@ -493,7 +493,7 @@ namespace bpkg
catch (const build2::failed&)
{
r.first = false;
- r.second = ds.str ();
+ r.second = trim (ds.str ());
}
ctx_ = nullptr;
diff --git a/bpkg/pkg-build.cxx b/bpkg/pkg-build.cxx
index 296a41c..72b8b7a 100644
--- a/bpkg/pkg-build.cxx
+++ b/bpkg/pkg-build.cxx
@@ -4665,10 +4665,13 @@ namespace bpkg
if (!pr.first)
{
- // @@ TODO: improve (see the other case).
- //
- fail << "unable to negotiate sensible configuration\n"
- << " " << pr.second;
+ diag_record dr (fail);
+ dr << "unable to negotiate sensible configuration for "
+ << "dependency " << p << '\n'
+ << " " << pr.second;
+
+ dr << info << "negotiated configuration:\n";
+ pc.print (dr, " ");
}
b->skeleton->dependent_config (pc);
@@ -6175,6 +6178,8 @@ namespace bpkg
{
// Verify and set the dependent configuration for this dependency.
//
+ // Note: see similar code for the up-negotiation case.
+ //
{
assert (b->skeleton); // Should have been init'ed above.
@@ -6185,16 +6190,18 @@ namespace bpkg
if (!pr.first)
{
- // @@ TODO: improve (print dependencies, dependents, config).
- // (also in the up-negotiation case).
- //
- // Note that the diagnostics from the dependent will most
+ // Note that the diagnostics from the dependency will most
// likely be in the "error ..." form (potentially with
// additional info lines) and by printing it with a two-space
// indentation we make it "fit" into our diag record.
//
- fail << "unable to negotiate sensible configuration\n"
- << " " << pr.second;
+ diag_record dr (fail);
+ dr << "unable to negotiate sensible configuration for "
+ << "dependency " << p << '\n'
+ << " " << pr.second;
+
+ dr << info << "negotiated configuration:\n";
+ pc.print (dr, " "); // Note 4 spaces since in nested info.
}
b->skeleton->dependent_config (pc);