Bug#630089: timestamped build logs?
On Sat, Jun 11, 2011 at 01:39:44PM +0200, Daniel Baumann wrote:
> On 06/10/2011 07:27 PM, Colin Watson wrote:
> >For example, perhaps the lb wrapper script could (be configured to)
> >print the current time before starting a command?
>
> patch welcome :)
Sorry for the delay. How about this? You have to set _VERBOSE="true"
by hand since 'lb config' comments it out, but I think that's OK, and it
makes this patch about as minimally intrusive as I could manage.
diff --git a/scripts/build/lb b/scripts/build/lb
index 58c1d12..03b7b47 100755
--- a/scripts/build/lb
+++ b/scripts/build/lb
@@ -39,21 +39,26 @@ case "${1}" in
;;
*)
+ Read_conffiles config/common
+
COMMAND="lb_${1}"
shift
if [ -x "${LB_BASE}/scripts/build/${COMMAND}" ]
then
- LB=1 exec "${LB_BASE}/scripts/build/${COMMAND}" "${@}"
+ SCRIPT="${LB_BASE}/scripts/build/${COMMAND}"
elif [ -x /usr/share/live/build/scripts/build/${COMMAND} ]
then
- LB=1 exec /usr/share/live/build/scripts/build/"${COMMAND}" "${@}"
+ SCRIPT=/usr/share/live/build/scripts/build/"${COMMAND}"
elif [ -x "$(which ${COMMAND} 2>/dev/null)" ]
then
- LB=1 exec "${COMMAND}" "${@}"
+ SCRIPT="${COMMAND}"
else
Echo_error "no such script"
exit 1
fi
+
+ Echo_verbose "%s: Running %s" "$(date -R)" "${COMMAND} ${@}"
+ LB=1 exec "${SCRIPT}" "${@}"
;;
esac
Thanks,
--
Colin Watson [cjwatson@ubuntu.com]
Reply to: