Changes between Version 25 and Version 26 of RpmHowToEndUsers


Ignore:
Timestamp:
Jan 1, 2018, 2:30:55 PM (6 years ago)
Author:
ak120
Comment:

minor spelling

Legend:

Unmodified
Added
Removed
Modified
  • RpmHowToEndUsers

    v25 v26  
    2424RPM is a low-level tool used to perform operations on package files directly and also to query the local database of installed packages in cases where YUM doesn't provide the required information. End users rarely need to use this tool.
    2525
    26 ||||'''rpm -i''' __pkg-XYZ__.rpm               ||Install the package contained in the file "__pkg-XYZ__.rpm" (all required packages must be already installed)
    27 ||||'''rpm -i --nodeps''' __pkg-XYZ__.rpm               ||Install the package contained in the file "__pkg-XYZ__.rpm" w/o checking for dependencies (only use that when you know exactly what you do)
    28 ||'''rpm -qi -p''' __pkg-XYZ__.rpm             ||'''rpm -qi''' __pkg__            ||Display information about the package file "__pkg-XYZ__.rpm" or about the installed package __pkg__ (name, version, etc.)
    29 ||'''rpm -qR -p''' __pkg-XYZ__.rpm             ||'''rpm -qR''' __pkg__            ||Display the requirements of the package file "__pkg-XYZ__.rpm" or the installed package __pkg__
    30 ||'''rpm -ql -p''' __pkg-XYZ__.rpm             ||'''rpm -ql''' __pkg__            ||List all files contained in the package file "__pkg-XYZ__.rpm" or the installed package __pkg__
     26||||'''rpm -i''' __pkg-XYZ__.rpm  ||Install the package contained in the file "__pkg-XYZ__.rpm" (all required packages must be already installed)
     27||||'''rpm -i --nodeps''' __pkg-XYZ__.rpm ||Install the package contained in the file "__pkg-XYZ__.rpm" w/o checking for dependencies (only use that when you know exactly what you do)
     28||'''rpm -qi -p''' __pkg-XYZ__.rpm    ||'''rpm -qi''' __pkg__ ||Display information about the package file "__pkg-XYZ__.rpm" or about the installed package __pkg__ (name, version, etc.)
     29||'''rpm -qR -p''' __pkg-XYZ__.rpm    ||'''rpm -qR''' __pkg__ ||Display the requirements of the package file "__pkg-XYZ__.rpm" or the installed package __pkg__
     30||'''rpm -ql -p''' __pkg-XYZ__.rpm    ||'''rpm -ql''' __pkg__ ||List all files contained in the package file "__pkg-XYZ__.rpm" or the installed package __pkg__
    3131||'''rpm -q --changelog -p''' __pkg-XYZ__.rpm  ||'''rpm -q --changelog''' __pkg__  ||Print the list of changes provided by the version of the package contained in "__pkg-XYZ__.rpm" or by the installed package __pkg__
    32 ||||'''rpm -qf''' /full/path/to/file       ||Search for an installed package owning the file "/full/path/to/file" (e.g. "/@unixroot/bin/sh")
    33 ||||'''rpm -q --whatrequires''' file       ||Search which package needs "file" (e.g. "libc066.dll")
     32||||'''rpm -qf''' /full/path/to/file  ||Search for an installed package owning the file "/full/path/to/file" (e.g. "/@unixroot/bin/sh")
     33||||'''rpm -q --whatrequires''' file  ||Search which package needs "file" (e.g. "libc066.dll")
    3434
    3535You may find more detailed information about YUM and RPM using the following links:
     
    4545So, 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.
    4646
    47 Let'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.
     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 flavour 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.
    4848
    4949The 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):
     
    9898}}}
    9999
    100 As YUM doesn't understand the : after our driveletter, we need to use the %3A instead. This is the : in a URI. The x above stands for any drive, where you want to store your local rpm. <path_to_repo> stands for the local directory.
     100As YUM doesn't understand the : after our drive letter, we need to use the %3A instead. This is the : in a URI. The x above stands for any drive, where you want to store your local rpm. <path_to_repo> stands for the local directory.
    101101
    102102As example:[[br]]
     
    104104
    105105== Note about upgrading from 2010 RPM builds ==
    106 Newer RPM builds are now using Berkeley DB for storing package informations, while previous builds were using SqLite 3 for this task. Since SqLite support is being phased out, RPM moved to BDB.
     106Newer RPM builds are now using Berkeley DB for storing package informations, while previous builds were using SQLite 3 for this task. Since SQLite support is being phased out, RPM moved to Berkeley DB.
    107107After updating you need to convert the old database to the new format: you can check this running
    108108{{{
     
    133133}}}
    134134you will get the list of installed packages.
    135 The older SqLite databases are now saved into mv /@unixroot/var/lib/rpm.bak, if everything is ok you can delete this directory.
     135The older SQLite databases are now saved into mv /@unixroot/var/lib/rpm.bak, if everything is ok you can delete this directory.