Call compare-versions in preinst with no version

Bug #550528 reported by mariodebian
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
alsa-utils (Ubuntu)
Fix Released
Undecided
Luke Yelavich

Bug Description

Binary package hint: alsa-utils

In alsa-utils.preinst script dpkg is called:

        if dpkg --compare-versions $2 le 1.0.21-1ubuntu1; then
                update-rc.d -f alsa-utils remove
                rm -f /etc/init.d/alsa-utils
        fi

in install phase, but $2 is empty and a error is show in console:

Unpacking alsa-utils (from .../alsa-utils_1.0.22-0ubuntu4_amd64.deb) ...
dpkg: --compare-versions takes three arguments: <version> <relation> <version>

Type dpkg --help for help about installing and deinstalling packages [*];
Use `dselect' or `aptitude' for user-friendly package management;
Type dpkg -Dhelp for a list of dpkg debug flag values;
Type dpkg --force-help for a list of forcing options;
Type dpkg-deb --help for help about manipulating *.deb files;
Type dpkg --license for copyright license and lack of warranty (GNU GPL) [*].

Please test $2 before using it.

Revision history for this message
Luke Yelavich (themuso) wrote : Re: [Bug 550528] [NEW] Call compare-versions in preinst with no version

 affects ubuntu/alsa-utils
 status inprogress
 assignee themuso

Changed in alsa-utils (Ubuntu):
assignee: nobody → Luke Yelavich (themuso)
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package alsa-utils - 1.0.22-0ubuntu5

---------------
alsa-utils (1.0.22-0ubuntu5) lucid; urgency=low

  * debian/preinst: Check that $2 is non-zero before calling dpkg
    --compare-versions. (LP: #550528)
 -- Luke Yelavich <email address hidden> Mon, 29 Mar 2010 09:35:41 +1100

Changed in alsa-utils (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.