Comment # 13 on bug 1187037 from
(In reply to Adam Majer from comment #0)
> For packages that have been moved already to using libalternatives, they
> will install their own config file. They will also need to call
> `update-alternatives --remove` in the %post to remove the legacy linkage
> (original packages would have a guard against removing update-alternatives
> links on upgrade). This call would then clobber the files installed by the
> package.

The last idea of the week :-)

We keep the `update-alternatives --remove` in the %post script as it is.

We have two use cases:
1. There are old entries in /etc/alternative for that package.
The remove update-alternatives deletes all old entries in /etc/alternative and
does not take care about entries in /usr/share/libalternative at all.
2. There are new entries in /usr/share/libalternative.
`update-alternatives --remove` recognizes it and calls "alts -l<name>" which
checks if these are still valid entries and checks also if the regarding found
binary is still there (so the package has not been deleted completely).
update-alternatives will REMOVE these entry ONLY if alts returns an error.

I must admit, that I am not so strictly against your suggestion anymore as in
the beginning of the discussion, but please think about that suggestion too :-)


You are receiving this mail because: