Re: Checking Dependencies



On Sun, 2006-04-09 at 15:20 -0400, Dan wrote:
Paul Howarth wrote:
On Sun, 2006-04-09 at 04:21 -0400, Dan wrote:

Jeffrey D. Yuille wrote:

Does anyone know the command for checking dependencies of a program
before deleting it? I didn't realize that after deleting a program
(in this case, wpa_supplicant), other critical programs would be
deleted as well. Fortunately, I was able to replace those
dependencies but would prefer to avoid this problem in the future.

rpm -q --requires packagename


That tells you what a package depends on, not what packages depend on
it.

Paul.


True. I meant rpm -q --whatrequires packagename . Though I've had odd
experiences where this command hasn't returned everything it should have.

Perhaps not everything you might expect anyway. There are multiple ways
a package can be a dependency, and this query only reveals one of those
ways.

Suppose you have a package A, which "provides" libA.so.1 and also
contains the file /bin/A

rpm -q --whatrequires A
will only show you the packages that have an explicit dependency on A
It won't show you the packages that have a dependency on libA.so.1 or
the file /bin/A

To get a full list of things that depend on package A, you'd need to:
rpm -q --whatrequires A
for everything listed by "rpm -q --provides A", do:
rpm -q --whatrequires $thing
for everything listed by "rpm -ql A", do:
rpm -q --whatrequires $thing
You'd then need to repeat that for every package named, and so on until
no new packages turned up.

The easiest way to find out what'll be deleted if you want to remove a
package and everything that depends on it is really just to do "yum
remove package" and be ready to answer "n" when prompted for
confirmation.

Paul.

-Dan


--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list



Relevant Pages

  • Re: ESR: Goodbye Fedora
    ... Review the list's archives a few years back, when the kernel-source package switched arches and what barrels of fun everyone had, as a result. ... Enjoy spending the rest of the day undoing the resulting mess, and cleaning up all the puke in your filesystem, and the rpm database. ... dependency resolution logic in rpm is too primitive, and simply cannot cope with many present-day cases. ... Then, when rpmbuild assembles a list of the new package's dependencies, it looks up which packages provide the new package's dependencies, pull those package's repository URLs, and add them as the new package's "downstream" URLs. ...
    (Fedora)
  • [PATCH 1/2] kbuil: add deb-pkg target
    ... # To prepare kbuild for more kernel packaging formats move all packaging ... # In top-level Makefile introduce generic support for all package ... Included the old rpm target for backward ... # and builddeb scripts. ...
    (Linux-Kernel)
  • Re: Conventions for NFS sharing of binaries
    ... Do you have distro & local packages with same name? ... mount it r/w on your "master installation machine" (with RPM management). ... If you replace a package with a different one with the same name, hmm, you ...
    (comp.os.linux.misc)
  • Re: ./configure command
    ... The package is not available. ... machines which don't even have an OS at all, let alone RPM, ... There is not a "the tool to package and install on Fedora". ... If he wants to avoid trouble, ...
    (Fedora)
  • Re: Backing up whole system
    ... Amanda is packaged by Fedora and if Gene feels that the packages are ... fedora's rpm is/was incapable of handling the nuances of using only enough ... When an rpm package can build a complete user from scratch, ... Do you really believe that rpm can install every package under the sun, ...
    (Fedora)