[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#474813: lprng/dpkg: preinst called with [ -z $1 ]



reassign 474813 debconf
thanks

On 2008-04-07 21:54 +0200, Justin Pryzby wrote:

> Package: lprng,dpkg
> Versions: 3.8.28dfsg.1-1.1, 1.14.16.6
>
> It seems unlikely, but this sure seems like a dpkg bug.
>
> Unpacking lprng (from .../lprng_3.8.28dfsg.1-1.1_amd64.deb) ...
> preinst called with unknown argument `'
>
> /var/lib/dpkg/info/lprng.preinst:
> |case "$1" in
> |install|upgrade|abort-upgrade)
> |	;;
> |*)
> |	echo "preinst called with unknown argument \`$1'" >&2
>
> 2008-04-07 15:00:49 install lprng <none> 3.8.28dfsg.1-1.1

This is fine, the last two parameters here are the previous and current
version of the installed package.

> It should have had $1 = install && -z $2.

I've tested that with `dpkg -D2' and it seems to pass the right
parameter:

,----
| $ sudo dpkg -D2 -i lprng_3.8.A\~rc4-3_i386.deb
| Selecting previously deselected package lprng.
| (Reading database ... 134019 files and directories currently installed.)
| Unpacking lprng (from lprng_3.8.A~rc4-3_i386.deb) ...
| D000002: fork/exec /var/lib/dpkg/tmp.ci/preinst ( install 3.8.A~rc4-3 )
| D000002: process_archive info installed /var/lib/dpkg/tmp.ci/postrm as /var/lib/dpkg/info//lprng.postrm
| D000002: process_archive tmp.ci script/file `.' contains dot
| D000002: process_archive tmp.ci script/file `..' contains dot
| D000002: process_archive tmp.ci script/file `/var/lib/dpkg/tmp.ci/config' installed as `/var/lib/dpkg/info/lprng.config'
| D000002: process_archive tmp.ci script/file `/var/lib/dpkg/tmp.ci/templates' installed as `/var/lib/dpkg/info/lprng.templates'
| D000002: process_archive tmp.ci script/file `/var/lib/dpkg/tmp.ci/conffiles' installed as `/var/lib/dpkg/info/lprng.conffiles'
| D000002: process_archive tmp.ci script/file `/var/lib/dpkg/tmp.ci/control' is control
| D000002: process_archive tmp.ci script/file `/var/lib/dpkg/tmp.ci/postinst' installed as `/var/lib/dpkg/info/lprng.postinst'
| D000002: process_archive tmp.ci script/file `/var/lib/dpkg/tmp.ci/preinst' installed as `/var/lib/dpkg/info/lprng.preinst'
| D000002: process_archive tmp.ci script/file `/var/lib/dpkg/tmp.ci/md5sums' installed as `/var/lib/dpkg/info/lprng.md5sums'
| D000002: process_archive tmp.ci script/file `/var/lib/dpkg/tmp.ci/prerm' installed as `/var/lib/dpkg/info/lprng.prerm'
| Setting up lprng (3.8.A~rc4-3) ...
| D000002: fork/exec /var/lib/dpkg/info/lprng.postinst ( configure 3.8.A~rc4-3 )
| Starting LPRng printer spooler: lpd.
`----

I've put a few lines with 'echo "$1"' into the lprng preinst, and it
seems that $1 gets lost after the call to check_configfile_locations;
since that function does not do anything obviously wrong to reset the
positional parameters, it seems debconf does something fishy here.

Reassigning to debconf,
Sven




Reply to: