28.11.2013 00:08, Andreas Beckmann wrote:
> On 2013-11-27 20:53, Michael Tokarev wrote:
>>> The leftover files are actually alternatives that were installed by the
>>> package but have not been properly removed.
>>
>> This is a bug filed against version 1.6 of qemu, but actual log provided
>> shows the issue for version 1.2 (wheezy).
> 
> The log is from an upgrade from wheezy (or jessie) to sid, and the
> alternative is left after purging the package in sid.

Oh. Got it.  Sorry for the confusion.

I updated the package to do what you described in this bugreport:

 * 'postinst configure' always installs the alternative
 * 'prerm remove' removes the alternative
 * 'postrm remove' and 'postrm disappear' remove the alternative

However, now we have an extra lintian warning, 
update-alternatives-remove-called-in-postrm
( 
http://lintian.debian.org/tags/update-alternatives-remove-called-in-postrm.html 
).

Here's the snipped I used to add the code:

# == begin update-alternatives maintscript fragment ==
# This is a script fragment used in postinst, prerm and postrm maintscripts.
# Set up /usr/bin/qemu alternative to be one the qemu-system emulators.
# See #722914 for details about how it is done

# we don't do anything if update-alternatives is not available
if [ -x /usr/sbin/update-alternatives ]; then

arches="@ARCH@" # our architectures

case "$DPKG_MAINTSCRIPT_NAME:$1" in

  postinst:configure )
    for arch in $arches ; do
      # Set i386 as highest priority,
      # as it has been the default qemu for quite some time.
      case $arch in i386) prio=20;; *) prio=10;; esac
      update-alternatives --install /usr/bin/qemu qemu \
              /usr/bin/qemu-system-$arch $prio
    done;;

  prerm:remove | postrm:remove | postrm:disappear )
    for arch in $arches ; do
      update-alternatives --remove qemu /usr/bin/qemu-system-$arch
    done;;

esac

fi # /usr/sbin/update-alternatives

# == end update-alternatives maintscript fragment ==

This is added to postinst, prerm and postrm scripts.

The lintian warning in question appears to make some sense.

So now I'm not sure what to do with this...

Thanks,

/mjt


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to