Side by side RPM versions
What is the "right" way, if any, to design RPMs so that multiple versions can be installed via YUM/RPM side by side without stomping on each other? For libraries, the right answer seems to be related to sonames, although I can't find any good information about how sonames, symlinks, and RPMs interact with each other. I have no idea how executables an开发者_开发技巧d plain files ought to be named/placed in order to be placed side by side. It seems the right behaviour as far as executables go would be to have the newer version on the PATH, but have the older version be on the PATH if the newer RPM is uninstalled.
Essentially you need to ensure that the versions do not conflict:
- Requires/Conflicts sections must not have conflicting requirements
- Each filename must only exist in one version - unless they are identical
- Scriptlets (%post ect) if you have them must cooperate
Note that you will have trouble installing multiple versions with yum as yum is designed to have one version installed at a time - with the exception of the kernel. If you install/update a package with yum all old versions will be removed. Consequently you'll need to use rpm -i for each version.
With regard to have more recent binaries in the path it is not possible to do it properly. You either need to do something like python where the user has to specify python or python3 on the command line or you have to do a dance with creating symlinks on the path to the binary that you want. This would have to be done in the scriptlets and managing it is quite a challenge. It also means that the symlink wouldn't be owned by any package.
精彩评论