This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
packages:alternatives [2016-02-01 06:21] glen |
packages:alternatives [2016-02-01 06:25] glen |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== alternatives ====== | ====== alternatives ====== | ||
- | [[http://linux.die.net/man/8/update-alternatives|update-alternatives]] - maintain symbolic links determining default commands | + | [[http://linux.die.net/man/8/update-alternatives|update-alternatives]] - maintain symbolic links determining default commands. |
+ | |||
+ | Default implementation in PLD Linux is provided by ''alternatives'' package from [[package>chkconfig]]. | ||
+ | |||
+ | ===== switching alternative ===== | ||
+ | |||
+ | By default ''alternatives'' uses ''auto'' mode picking the "best" alternative. | ||
+ | |||
+ | //TODO: how to enforce sysadmin preference// | ||
===== integrating ===== | ===== integrating ===== | ||
Line 39: | Line 47: | ||
- the ''%%--slave%%'' option is optional and may be repeated, use if you wish to "group" alternatives | - the ''%%--slave%%'' option is optional and may be repeated, use if you wish to "group" alternatives | ||
- use proper ''%postun'' to remove alternative on package uninstall | - use proper ''%postun'' to remove alternative on package uninstall | ||
+ | |||
+ | <note warning> | ||
+ | Currently it remains unclear how to handle optional files, as for above example: | ||
+ | - ''%{_mandir}'' path can be missing if ''%_excludedocs'' is set | ||
+ | - ''%{_mandir}'' path could be ''.gz'' compressed or not, it's currently solved with a glob: ''%{_mandir}/man1/phar%{ver_suffix}.1*'' | ||
+ | </note> |