On Tue, May 03, 2011 at 03:11:48PM +0200, Thorsten Glaser wrote:
> Package: dictionaries-common
> Version: 1.10.6
> Severity: grave
> Justification: renders package unusable
>
> High severity because this is aborting a d-u from squeeze to wheezy.
>
> Setting up dictionaries-common (1.10.6) ...
> Processing triggers for dictionaries-common ...
> /var/lib/dpkg/info/dictionaries-common.postinst[116]: ${*#triggered}: bad
> substitution
> dpkg: error processing dictionaries-common (--configure):
> subprocess installed post-installation script returned error exit status 1
>
> Analysis:
>
> 9 case "$1" in
> 10 configure)
> [???]
> 85 ;;
> 86 triggered)
> 87 for trigger in ${*#triggered}; do
> 88 [ -z "$DICT_COMMON_DEBUG" ] || echo "Running trigger
> $trigger" >&2
> [???]
>
> This is invalid, it???s not allowed to trim a vector. Suggested fix:
>
> [???]
> triggered)
> shift
> for trigger in "$@"; do
> [ -z "$DICT_COMMON_DEBUG" ] || echo "Running trigger $trigger"
> >&2
...
> Shell: /bin/sh linked to /bin/mksh
Thanks for reminding.
${*#triggered} was actually a reminescence of an attempt to trim "triggered"
string from "$*" string, but discarding "triggered" is explicitly done in
the case condition, so besides not working (IIRC it does nothing for bash
and dash) should not be needed at all.
By the way, this error seems to only affect mksh, not bash or dash.
In this particular case, I'd expect that both
for trigger in "$@"; do
and
for trigger in $*; do
should in practice work. Do you expect any difference in practice for this
particular case when using mksh? Will wait for your reply before doing the
actual change.
Regards,
--
Agustin
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]