Thursday, October 22, 2009

How not to use RPM

This one would better go to the dailywtf.
In order to achieve some kind of multiple installed versions of the same package some guy thought a "wise" solution.
Every release of package foo will install itself in /opt/foo/<version> and will create a symbolic link as /opt/foo/current -> /opt/foo/<version>. Every time the package would be installed with rpm -ivh foo-<version>.
On uninstall the rpm -e will erase the latest version and move the link to the previously installed one.
In my humble opinion this is not really the way RPM was meant to be used. The idea behind RPM is to offer consistent package management and not handling concurrent versioning for packages. Upgrading is handled by the package manager itself via internal mechanisms.
The most flawed part of this approach is that human errors would compromise this kind of multi version setup for packages in a manner that automated recovery would not be possible.
The management of concurrent versions of the same package proved - at least for me a real pain in the ass over the time therefore I am more than reluctant to apply such a scheme.

No comments:

Post a Comment