Stephen Warren wrote:
> 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.
Aha - configuring the alternatives inside %posttrans instead of %post
appears to solve the problem...