Package: debootstrap
Version: 0.3.1.7
Severity: important

The function 'repeat' in /usr/lib/debootstrap/functions causes a problem
if /bin/sh is not linked to bash but zsh:

[EMAIL PROTECTED] ~ % debootstrap
/usr/lib/debootstrap/functions:951: parse error near `()'
I: usage: [OPTION]... <suite> <target> [<mirror> [<script>]]
I: Try `debootstrap --help' for more information.
E: You must specify a suite and a target.

,---- [ a short demonstration ]
| % cat ./test_repeat
| function repeat () {
|   echo $*
| }
| repeat foobar
|
| % zsh
| % ./test_repeat foobar
| ./test_repeat:6: parse error near `\n'
| % zsh ./test_repeat
| %
| % sh ./test_repeat foobar
| ./test_repeat:6: parse error near `\n'
| % which sh
| /bin/sh
| % ls -l /bin/sh
| lrwxrwxrwx  1 root root 8 2005-11-20 17:50 /bin/sh -> /bin/zsh
| % bash ./test_repeat foobar
| foobar
| %
`----

AFAICS the problem is that 'repeat' is a shell reserved word in zsh:

% zsh -c 'which repeat'
repeat: shell reserved word

while it's not in bash:

% bash -c 'type repeat'
bash: line 0: type: repeat: not found

A fix would be either to use /bin/bash in the shebang line of
debootstrap (this is my current fix) or to rename function 'repeat' to
something different.

regards,
-mika-


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to