Alternatives policy

Материал из Rosalab Wiki
Версия от 10:51, 30 мая 2012; PastorDi (обсуждение | вклад)

Это снимок страницы. Он включает старые, но не удалённые версии шаблонов и изображений.
Перейти к: навигация, поиск
This page explains how to manage coexisting different versions of a same software in ROSA Linux.



If any of the following statements are true, you have to introduce a parallel version instead of replacing current one:

  • this is an unstable version, and the stable one is already present in cooker
  • this version is not compatible with the old one, and you are not able to create migration scripts which automatically reconfigure the new version with the old settings



So as to allow different versions to coexist, the new one must use a different name. This should be the name of the package, with the major version appended directly. Exceptions:

  • If the package name ends with a number, an underscore must be intercaled between the name and the major version.
  • If another parallel version already exist, major and minor version must be used.

There should always be a default version, without suffix, so as to have urpmi foo install foo.


you must add the following requirements to the spec file:

Requires(post):     update-alternatives
Requires(postun):   update-alternatives


For %postun you need to test for the existence of the alternative in order to allow dropping the alternatively cleanly in the future:

# This is *correct*:
if [ ! -e %{_bindir}/emacs-nox ]; then
  update-alternatives --remove emacs %{_bindir}/emacs-nox

# This is *wrong*:
if [ $1 -eq 0 ]; then
  update-alternatives --remove emacs %{_bindir}/emacs-nox

Different scenarios:

  • no parallel installation: the new version must be tagged as conflicting with the existing one
  • parallel installation without alternative
  • parallel installation with alternative



gimp and gimp2_2 are in the distro, gimp2_2 is the default.

This is WRONG, the default version of a package should be the simpler one, so that a urpmi gimp always install the default choosen version of a package.

The correct naming would be to have gimp (version 2.2) and gimp1.3.


MySQL version 4.0 is in the distro, and you want to include the new development version MySQL-4.1.

The new package should be named MySQL41.


Postgresql 7.4.6 is in the distro, you want to keep it but you want to include, as default, the new postgresql 8.0.

You must rename the old postgresql to postgresql7 (or postgresql74) and use the name 'postgresql' for the new package.

This Policy is based on the Mandriva Alternatives Policy.