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

Bug#658210: lintian: update-alternatives --install/--remove should only be used in pairs



Package: lintian
Version: 2.5.4
Severity: wishlist

Hi,

update-alternatives should only be used in pairs.
Usually postinst will register an alternative with
    update-alternatives --install ...
There should be a corresponding
    update-alternatives --remove ...
in prerm (postrm would be ok, too, but leaves a short period of
breakage where the alternative is dangling).

There are currently about 15 packages in sid that forget to remove the
alternative on package removal.

It would be nice if lintian could check for having matching pairs of
this command. A package may register multiple alternatives - and all
should be removed. Removing obsolete alternatives in preinst/postinst
should not be accounted for.

There are some packages that do a bit of "magic" using alternatives,
e.g. glx-alternatives [source, contrib], nvidia-alternative [binary,
non-free] and may produce false positives in such a check.


Andreas



Reply to: