Debconf syntax error message that I don't understand
Hi,
I am at a loss with shell script that uses debconf. The script itself
is in /etc/libpaper/, but since it is often called from maintainer
scripts, it uses debconf.
The problem is that debconf says it didn't get the right number of
arguments, but I think it did. This is the relevant line of code:
sub command_subst {
my $this = shift;
return $codes{syntaxerror}, "Incorrect number of arguments" if @_ < 2;
So why does it think it has less than two arguments when what it gets is
texlive-base/texconfig_ignorant,binary,dvipdfmx
I even tried to feed it an additional "foo" at the end, but that doesn't
change anything. Probably I'm missing something trivial...
Regards, Frank
P.S. Script at
http://anonscm.debian.org/viewvc/debian-tex/texlive2009/trunk/texlive-base/debian/texlive-base.libpaper?view=log
--
Frank Küster
Sprecher B90/Grüne OV Miltenberg und Umgebung
VCD Miltenberg, ADFC Aschaffenburg-Miltenberg
Debian Developer (TeXLive)
--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 87pqlgv4wt.fsf@alhambra.kuesterei.ch">http://lists.debian.org/87pqlgv4wt.fsf@alhambra.kuesterei.ch
07-12-2011, 07:09 PM
Joey Hess
Debconf syntax error message that I don't understand
Frank Küster wrote:
> Hi,
>
> I am at a loss with shell script that uses debconf. The script itself
> is in /etc/libpaper/, but since it is often called from maintainer
> scripts, it uses debconf.
>
> The problem is that debconf says it didn't get the right number of
> arguments, but I think it did. This is the relevant line of code:
>
> db_subst texlive-base/texconfig_ignorant binary "$binary"
>
> and this is what debconf says:
>
> + db_subst texlive-base/texconfig_ignorant binary dvipdfmx
> + _db_cmd SUBST texlive-base/texconfig_ignorant binary dvipdfmx
> + IFS= printf %s
SUBST texlive-base/texconfig_ignorant,binary,dvipdfmx
Your script is setting IFS=","
This was supposed to be dealt with in #381619, but the change was broken.
I've committed the right change to debconf for version 1.5.41.
All you need to do to fix it in your script though is to restore IFS
before you start talking to debconf.