We have a few little rpm's which contain no actual files but only %post and %postun scripts that create soft links. The reason is that they must figure out the targets of the soft links as they execute because the targets are in relocatable packages. We want to ensure that a user cannot install two versions of any one of these softlink packages simultaneously. We were surprised (pleasantly) that you could install two versions of the same rpm so long as they didn't contain any of the same files. (Now that we know that's possible, we plan to use that fact to allow multiple versions of some of our software to be installed. We had been planning to make the version numbers part of the Names. Now we don't have to do that, and things will be cleaner.) But there's still the problem with the softlink rpm's which must arrange to be mutually exclusive with other versions of themselves. After some experimentation, we discovered that the following style of header was the only way we could ensure that. Here's a genericized excerpt: Name: links Version: 4.3 Conflicts: links < 4.3 links > 4.3 (If there's a better way to achieve this, please let me know. I couldn't find one.) That works just fine, disallowing the cases we were worried about, and allowing the ones we want. The only problem is that when you try to remove an rpm with this style of Conflicts:, you get this error: package links not found in conflict index The removal does work, so this is just a pesky error.
=====Example specs (first): Summary: links Name: links Version: 4.3 Release: 1 Copyright: BSD Group: System Environment/Shells AutoReqProv: no Conflicts: links < 4.3 links > 4.3 %description A softlink %prep %build %install %clean %files %post # # In reality, /bin/ksh here would be determined as the script runs, but I'm # keeping it simple. # ln -s /bin/ksh /usr/opt/softlink %postun rm -f /usr/opt/softlink =====(second): Summary: links Name: links Version: 5.0 Release: 1 Copyright: BSD Group: System Environment/Shells AutoReqProv: no Conflicts: links < 5.0 links > 5.0 %description A softlink %prep %build %install %clean %files %post # # In reality, /bin/bash here would be determined as the script runs, but I'm # keeping it simple. # ln -s /bin/bash /usr/opt/softlink %postun rm -f /usr/opt/softlink
The error message is what's wrong. At package removal, all occurences of the same name are flushed from the conflicts inverted list. The 1st occurence of the dependency is flushing all dependencies, the 2nd ocurrence is complaining that the 1st occurence has already flushed references to the package being removed.