Changes between Version 22 and Version 23 of RpmHowToEndUsers


Ignore:
Timestamp:
Apr 6, 2015, 7:12:49 PM (9 years ago)
Author:
dmik
Comment:

Add Swapping alternate packages.

Legend:

Unmodified
Added
Removed
Modified
  • RpmHowToEndUsers

    v22 v23  
    3939 * RPM website: http://www.rpm.org/
    4040
     41== Swapping alternate packages ==
     42
     43There are packages that provide identical functionality using a different set of programs. Often such alternate packages cannot be installed together because they provide identical file names or need exclusive access to some other resources. If you try to install one package without first removing another, RPM will complain.
     44
     45So, in order to swap such packages — usually, to switch between various implementations of the given functionality — you first need to remove one package and then install another one. However, there may be other packages that depend on the provided functionality and if any of these dependent packages is already installed when you try to remove one of the alternatives, RPM will not let you do that too.
     46
     47Let's assume a real world example. You want to switch from the `ash-sh` package (that provides the original NetBSD version of the POSIX shell) to the `dash-sh` package (that provides the Debian flavor of NetBSD shell). Both of these packages install a file called `/@unixroot/usr/bin/sh.exe` and you will surely have many packages that depend on that file (basically, any package that contains shell scripts) already installed, so two separate install-remove steps won't work. You need a special command to perform such a swap.
     48
     49The current version of `yum` lacks a one-line command for this operation but there is an easy way to do using the interactive Yum Shell. Here is how to switch from `ash-sh` to `dash-sh` using this approach (commands you that type in are the ones after the `>` prompt):
     50
     51{{{
     52D:>yum shell
     53Setting up Yum Shell
     54> remove ash-sh
     55Setting up Remove Process
     56> install dash-sh
     57Setting up Install Process
     58> run
     59> exit
     60}}}
     61
     62You may swap any conflicting packages using this algorithm provided that the resulting package configuration does not leave any unresolved package dependencies.
     63
    4164== Platform selection for binaries ==
     65
    4266The default base architecture setting for RPM/YUM is the i386 platform; if you own a i686 CPU (PentiumPro and above), you can tell YUM to inspect i686 package list first, and fallback to i386 if none found.
    4367To enable i686, create a 'platform' text file in your %UNIXROOT%\etc\rpm directory with the following text in it: