[CentOS] rpm dependency question

Filipe Brandenburger filbranden at gmail.com
Thu Jul 31 02:14:01 UTC 2008

On Wed, Jul 30, 2008 at 18:22, Mark Belanger <mark_belanger at ltx.com> wrote:
> Problem is, the vendor supplied
> un-install script fails to un-install because of the
> dependency MyPackage has on one of it's libraries.

Well, that's the correct behaviour, that's what RPM is for after all.
If you uninstall the library, the programs in MyPackage will break, so
the only way to (cleanly) uninstall the library is to uninstall
MyPackage first.

> Is there a way to build my package so that it has
> no knowledge of external dependencies?

Yes, add "AutoReqProv: no" (syntax may not be 100% correct here) to
the specfile.

> My other option
> is to alter the vendor supplied uninstall script so that
> it does rpm -e --nodeps. I'd very much prefer to not
> mess with the vendor supplied scripts.

Or uninstall MyPackage, since it will be broken after you install the libraries.

> I guess as a related question, how does my rpm know
> about external dependencies?  Is rpmbuild doing some
> analysis of it's content via ldd or something?

Basically, it does an "ldd" (actually "objdump" which is a more
powerful "ldd") of the binaries, which will list to which libraries
they are linked.

See this script for more details: /usr/lib/rpm/find-requires


More information about the CentOS mailing list