introducing alternatives into a package

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

 



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
-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux