* Stephan Kulow
Am 07.02.2014 15:37, schrieb Guido Berhoerster:
As are the symlinks in %bindir etc., each time update-alternatives is called these are overwritten. No, they are not. the symlinks in %bindir point to /etc/alternatives/* and stay as that.
They are stable as long as the alternative path remains stable, but are ultimately managed by update-alternatives and not controlled by rpm itself since update-alternatives will happily overwrite symlinks if they don't point to the alternative. Apart from making that obvious in the specfile it also has the practical side effect that in order to change an alternative name one only has to adjust the update-alternatives call when using Fedora's method of ghosting or Debians practice of omitting alternative links rather than also having to adjust the filelist and symlink creation when following our guidelines. I suppose that's why Fedora and Debian-based distros ghost or omit the symlinks.
So it is at least a common practice to create commands/manpages etc. that are managed by update-alternatives as empty dummy files (in order to avoid stale symlinks) which are %ghost'ed and overwritten at installation time by update-alternatives when called by %post scriptlets. This is also the approach taken by RH/Fedora*. What's the reason to do this differently now?
[*] https://fedoraproject.org/wiki/PackagingDrafts/UsingAlternatives
I'm aware that Fedora Packaging is broken in that regard. Our packaging guidelines didn't change though. A %ghost in %bindir is *wrong* and I tried to explain why.
If you need another reason: switching from /usr/bin/foo the binary to /usr/bin/foo the symlink will *not* happen if /usr/bin/foo is a %ghost and update-alternatives will not remove binaries. So you will stay with the old /usr/bin/foo and you will find yourself in need of work arounds in the package.
That's indeed a problem although it can be addressed by calling update-alternatives with --force as e.g. ksh does. Ghosting the alternative paths makes sense, so I've submitted adjustments to mksh, ksh, mawk, gawk, lightdm-gtk-greeter, and lightdm-kde-greeter. -- Guido Berhoerster -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org