/usr/bin/annotate-scripts cannot use date format with whitespace
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
devscripts (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
$ annotate-output "+%F %T" whoami
date: extra operand `%T'
Try `date --help' for more information.
I: Started whoami
date: extra operand `%T'
Try `date --help' for more information.
O: glennj
date: extra operand `%T'
Try `date --help' for more information.
I: Finished with exitcode 0
This is due to not using double quotes to protect the date format.
Please consider the following diff:
$ diff /usr/bin/
28c28
< echo "`date ${FMT}` $1: $line"
---
> printf "%s %s: %s\n" "$(date "$FMT")" "$1" "$line"
78c78
< echo "`date ${FMT}` I: Started $@"
---
> addtime I <<< "Started $*"
83c83
< echo "`date ${FMT}` I: Finished with exitcode $EXIT"
---
> addtime I <<< "Finished with exitcode $EXIT"
Test with: annotate-output "+%F %T" sh -c 'echo stdout; echo stderr >&2'
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: devscripts 2.11.6ubuntu1.6
ProcVersionSign
Uname: Linux 3.2.0-60-
ApportVersion: 2.0.1-0ubuntu17.6
Architecture: i386
Date: Mon Mar 31 10:55:34 2014
InstallationMedia: Ubuntu-Server 12.04.1 LTS "Precise Pangolin" - Release i386 (20120817.3)
MarkForUpload: True
SourcePackage: devscripts
UpgradeStatus: No upgrade log present (probably fresh install)