Changes between Version 25 and Version 26 of RpmHowToEndUsers
- Timestamp:
- Jan 1, 2018, 3:30:55 PM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
RpmHowToEndUsers
v25 v26 24 24 RPM 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. 25 25 26 ||||'''rpm -i''' __pkg-XYZ__.rpm 27 ||||'''rpm -i --nodeps''' __pkg-XYZ__.rpm 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__ 31 31 ||'''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 33 ||||'''rpm -q --whatrequires''' file 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") 34 34 35 35 You may find more detailed information about YUM and RPM using the following links: … … 45 45 So, 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 46 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 flavo r 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.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 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. 48 48 49 49 The 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): … … 98 98 }}} 99 99 100 As 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.100 As 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. 101 101 102 102 As example:[[br]] … … 104 104 105 105 == 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 S qLite 3 for this task. Since SqLite support is being phased out, RPM moved to BDB.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 Berkeley DB. 107 107 After updating you need to convert the old database to the new format: you can check this running 108 108 {{{ … … 133 133 }}} 134 134 you will get the list of installed packages. 135 The older S qLite databases are now saved into mv /@unixroot/var/lib/rpm.bak, if everything is ok you can delete this directory.135 The older SQLite databases are now saved into mv /@unixroot/var/lib/rpm.bak, if everything is ok you can delete this directory.