introducing alternatives into a package
Stephen Gallagher
sgallagh at redhat.com
Wed Dec 10 12:58:35 UTC 2014
On Wed, 2014-12-10 at 04:09 -0500, Jens Petersen wrote:
> Hi,
>
> http://fedoraproject.org/wiki/Packaging:Alternatives explains how
> alternatives should be done in Fedora, however it does not seem to
> address the case of converting an existing package to use alternatives.
>
> Specifically the problem arises when a file is changed to become a %ghost.
> It seems rpm keeps the old file around as a ghost and so update-alternatives
> does not create the new symlink.
>
> I remember this happening when emacs introduced alternatives
> a good while back: at the time I worked around it just by removing
> emacs and reinstalling it.
>
> Adding:
>
> %pre
> if [ $1 -gt 1 ] ; then
> if [ -f %{_bindir}/%{name} -a ! -L %{_bindir}/%{name} ]; then
> rm %{_bindir}/%{name}
> fi
> fi
>
> seems to be one way to handle this.
>
> Is there any better way to do this or is the above solution good enough?
>
> If so maybe I should ask FPC about updating Packaging:Alternatives to
> include this. (I kind of wish these kind of idioms would be defined
> as rpm macros.)
>
> Jens
I'm CCing this to the packaging at lists.fedoraproject.org mailing list, as
you're more likely to get a useful response from there.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <http://lists.fedoraproject.org/pipermail/devel/attachments/20141210/74243e80/attachment.sig>
More information about the devel
mailing list