rpm, alternatives and moving a file between packages

Stephen Warren s-t-rhbugzilla at wwwdotorg.org
Sat Feb 23 07:48:17 UTC 2008


The existing unison rpm owns /usr/bin/unison.

I'd like to propose removing the unison rpm, and replacing it with
unison2.13 and unison2.27, so they could both be installed side-by-side.
Further, I'd these rpms to use alternatives to provide /usr/bin/unison.

So, I created those two new rpms and made %post set up the alternative.
I also set unison2.13 to obsolete unison in order to automatically
switch people to the new rpms on a "yum update". However, with this set
up, since yum erases the original unison after installing the new
unison2.13, the erase deletes /usr/bin/unison, leaving it non-existent
after the update.

So, I made the 2 new unison packages both package /usr/bin/unison as a
direct symlink to themselves, as a %ghost file. Now, "yum update" works
fine, I guess because yum knows that /usr/bin/unison "moved" between the
packages. However, if I start with no unison installed, and yum install
both of them, they can't be installed together because they both package
/usr/bin/unison.

So, I don't know what the solution is to this. Perhaps I should just
give up on supporting the /usr/bin/unison name at all? Perhaps it should
be statically assigned to the unisonNNN package that's most recent on a
given distro?

Any thoughts/pointers welcome.




More information about the fedora-devel-list mailing list