The motivation for this change is to allow edob to be used with noisy commands, i.e., commands that produce a lot of output, in cases where
the output is in general not of interest. However, if the command
fails, the output should be shown and appear in build.log.
We do this by simply redirecting the output to a file in $T, and show
this file if the command returned a non-zero exit status.
We already have a few cases in ::gentoo where such output is simply redirected to /dev/null, hindering post-mortem analysis. Those could
be converted to edob with its new behavior.
PR at https://github.com/gentoo/gentoo/pull/36117
Florian Schmaus (2):
edo.eclass: enhace edob for usage with nosiy commands
eftmutil-sys: use edob
eclass/edo.eclass | 54 ++++++++++++++++++++++++++++++++----
eclass/texlive-common.eclass | 8 ++++--
2 files changed, 53 insertions(+), 9 deletions(-)
# @FUNCTION: edob^^!
-# @USAGE: <command> [<args>...]
+# @USAGE: [-m <message>] [-l <log-name>] <command> [<args>...]
-l <log-name> is provided, then <log-name> is[..]
edob() {[..]
+ while true; do^^! ITYM '-l' here
+ case "${1}" in
+ -m|-n)
+ [[ $# -lt 2 ]] && die "Must provide an argument to ${1}"^^! ITYM '-l' here
+ case "${1}" in + -m) + message="${2}" + ;; + -n)
+ log="${2}"
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 407 |
Nodes: | 16 (2 / 14) |
Uptime: | 15:30:20 |
Calls: | 8,555 |
Calls today: | 7 |
Files: | 13,219 |
Messages: | 5,925,665 |