Eric Tanguy wrote:
Le mercredi 25 janvier 2006 à 16:25 +0000, Paul Howarth a écrit :
Eric Tanguy wrote:
Le mercredi 25 janvier 2006 à 13:08 +0000, Paul Howarth a écrit :
Eric TANGUY wrote:
How to know which packages (not files) are required by a local package
(not in a repository). Those already installed and those not installed.
$ rpm -q --requires name-of-installed-package
$ rpm -qp --requires name-of-some.rpm
Paul.
Thanks Paul but this command gives the files needed by the packages
whereas i'm looking for the list of the packages which contains theses
files. I'm not sure to well explain myself.
The --requires option shows the dependencies, which may be files,
packages or "virtual dependencies". All of these should be installable
using yum.
For example, if an RPM file has a listed dependency of
'perl(MIME::Base64)' (a virtual dependency), you can do:
# yum install 'perl(MIME::Base64)'
and yum will figure out the package that is needed, and install it.
What are you actually trying to do?
Paul.
I have a package and i would like to know what packages have to be
installed with it to be sure i have forget nothing in the requires section.
If this is someone else's package that you've downloaded, rpm shouldn't
let you install it unless the package's dependencies are already installed.
If this is a package you're building yourself, there isn't a reliable
automated way of determining all of the requirements you need to add to
your spec file. In some cases things are simple and you don't need to
add anything as rpm will add dependencies for libraries etc., but in
other cases you may need to read the software's documentation or
possibly even the source code to determine what other packages it
requires. If the package requires a specific file to be present, you
could simply add a dependency on that file:
Requires: /path/to/file
If there are a lot of these, you may find it better to find out which
package provides those files (the list is probably shorter) and require
those packages.
$ rpm -qf /path/to/file
This assumes that the file is already present on your system, a
reasonable assumption if you're building a package that requires it.
Paul.