I have an rpm I've created that has a dependency on a library provided by a third party. This dependency is not specified anywhere in my spec file yet the package seems to know about when I run: # rpm -qip --requires MyPackage.rpm
The third party rpm is installed and uninstalled via a vendor-supplied script so that they can prompt you to accept licenses and so on. Problem is, the vendor supplied un-install script fails to un-install because of the dependency MyPackage has on one of it's libraries.
Is there a way to build my package so that it has no knowledge of external dependencies? 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.
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?
-Mark
On Wed, Jul 30, 2008 at 18:22, Mark Belanger mark_belanger@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
HTH, Filipe