Best way to filter automated dependencies

Daniel Neuberger daniel.neuberger at
Thu Jun 9 14:42:26 UTC 2011


Is adding something like the following the best way to filter or
exclude a certain shared library from the list of automatically
generated dependencies for a certain package?

%define _use_internal_dependency_generator 0
cat <<EOF > %{_builddir}/%{name}-%{version}/myfindreq
%{__find_requires} | %{__grep} -v libfoo
%define __find_requires %{_builddir}/%{name}-%{version}/myfindreq
chmod +x %{__find_requires}

Why won't the following work?

%define _use_internal_dependency_generator 0
%define __find_requires /usr/lib/rpm/find-requires | grep -v libfoo

Also, is the _requires_exceptions macro still supported?  I couldn't
get it working:

%define _requires_exceptions libfoo

I know that messing with the automated dependencies is in general a
bad idea, but unfortunately we're using a third party library who's
RPM doesn't properly specify the dependencies it provides.  Instead,
I'm going to filter the dependency from our RPM and then specify the
actual file manually.

Thanks for the help.

- Daniel

More information about the Rpm-list mailing list