aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/install
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-11-08 10:34:22 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-11-08 11:08:03 +0200
commit3bc0fc4c4496c345c79734dcd6dc56d44119aebf (patch)
treed058018aaf35641e461e51c2c20d374fd0d1684c /libbuild2/install
parent84e6c7e62c9d1613af3cad81787b3f277d276140 (diff)
Make process exit diagnostics consistent
In particular, we now always print error message on non-0 exit except in cases where such exit is ignored.
Diffstat (limited to 'libbuild2/install')
-rw-r--r--libbuild2/install/rule.cxx30
1 files changed, 22 insertions, 8 deletions
diff --git a/libbuild2/install/rule.cxx b/libbuild2/install/rule.cxx
index aa13169..8fd180c 100644
--- a/libbuild2/install/rule.cxx
+++ b/libbuild2/install/rule.cxx
@@ -246,7 +246,7 @@ namespace build2
//
// Remember that we are called twice: first during update for install
// (pre-operation) and then during install. During the former, we rely
- // on the normall update rule to resolve the group members. During the
+ // on the normal update rule to resolve the group members. During the
// latter, there will be no rule to do this but the group will already
// have been resolved by the pre-operation.
//
@@ -848,7 +848,9 @@ namespace build2
text << "install " << chd;
}
- run (ctx, pp, args);
+ run (ctx,
+ pp, args,
+ verb >= verbosity ? 1 : verb_never /* finish_verbosity */);
}
void file_rule::
@@ -903,7 +905,9 @@ namespace build2
}
if (!ctx.dry_run)
- run (ctx, pp, args);
+ run (ctx,
+ pp, args,
+ verb >= verbosity ? 1 : verb_never /* finish_verbosity */);
}
void file_rule::
@@ -946,7 +950,9 @@ namespace build2
}
if (!ctx.dry_run)
- run (ctx, pp, args);
+ run (ctx,
+ pp, args,
+ verb >= verbosity ? 1 : verb_never /* finish_verbosity */);
#else
// The -f part.
//
@@ -1185,7 +1191,10 @@ namespace build2
1 /* stdout */,
dbuf.open (args[0]) /* stderr */));
dbuf.read ();
- r = run_finish_code (dbuf, args, pr);
+ r = run_finish_code (
+ dbuf,
+ args, pr,
+ verb >= verbosity ? 1 : verb_never /* verbosity */);
}
if (!r)
@@ -1280,11 +1289,16 @@ namespace build2
process_path pp (run_search (args[0]));
- if (verb >= verbosity && verb >= 2)
- print_process (args);
+ if (verb >= verbosity)
+ {
+ if (verb >= 2)
+ print_process (args);
+ }
if (!ctx.dry_run)
- run (ctx, pp, args);
+ run (ctx,
+ pp, args,
+ verb >= verbosity ? 1 : verb_never /* finish_verbosity */);
}
return true;