On 2009-03-09 15:19 +0100, Margarita Manterola wrote:
> Package: backup-manager
> Version: 0.7.7-1.1
> Tags: patch
>
> The checking of the day in the
> /usr/share/backup-manager/backup-methods.sh file, changed between
> etch's and lenny's version. In etch, it used to be:
>
> if [ "$master_day" -eq "$BM_TARBALLINC_MASTERDATEVALUE" ]; then
>
> But in lenny, now it's
>
> if [[ "$master_day" -eq "$BM_TARBALLINC_MASTERDATEVALUE" ]]; then
>
> The use of [[ instead of [ makes bash interpret the numbers "08" and
> "09" as invalid octal numbers, giving the error:
>
> /usr/share/backup-manager/backup-methods.sh: line 374: [[: 08: value
> too great for base (error token is "08")
>
> The fix is extremely simple: change the date call, so that no left
> zeroes are added:
>
> --- backup-methods.sh 2009-03-09 12:02:44.000000000 -0200
> +++ /usr/share/backup-manager/backup-methods.sh 2009-03-09
> 12:02:50.000000000 -0200
> @@ -336,7 +336,7 @@
> master_day=$(date +'%w')
> ;;
> monthly)
> - master_day=$(date +'%d')
> + master_day=$(date +'%-d')
> ;;
> *)
> error "Unknown frequency: \$BM_TARBALLINC_MASTERDATETYPE"
Or we could use [ instead of [[ again, but that would lose some
consistency since [[ is used throughout. Alexis, will you install this
patch upstream? I'm going to put it in the next Debian version.
Cheers,
Sven
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]