rpm autodeps (was: (no subject))

Pavel Kankovsky peak at argo.troja.mff.cuni.cz
Mon Nov 15 12:21:38 CET 2004


On Wed, 10 Nov 2004, Matthias Andree wrote:

> Welcome to the dark side of RPM - its distribution-dependent scripts and
> its awfully incomplete documentation. The dependencies are determined by
> a distribution-specific script, and David is building the binary RPMs on
> Mandrake Linux. If you're using Red Hat or Fedora, scripts may be
> different, and SuSE scripts are again different.

Scripts generating autodependencies depend on the version of RPM in the
first place; distros may customize them but afaik they don't do it often
(unless you count bugfixes). Older versions of RPM did not generate
autoreqs for Perl scripts, newer versions do. To make things a little bit
more complicated, /usr/lib/rpm/perl.req was broken and/or shipped without
x-bit (i.e. it was not used) in some versions.

> You can either try to figure out which RPM contains the Perl
> MIME::Parser module and install it, or just ignore the problem and add
> "--nodeps" to your rpm command - MIME::Parser is needed exclusively for
> contrib/mime.get.rfc822.

It is possible to suppress autoreqs on certain files. It needs some 
"manual  work" but it can be done. For instance, you can use this:

%define __find_requires %{_builddir}/%{buildsubdir}/find-requires
cat >%{__find_requires} <<EOF
#!/bin/sh
grep -v /contrib | exec `rpm --eval '%%{__find_requires}'`
EOF
chmod +x %{__find_requires}

and RPM won't generate any autoreqs for contrib files.
An alternative, and perhaps cleaner, approach is to split the package 
into two packages (one for basic programs, one for contrib).


--Pavel Kankovsky aka Peak  [ Boycott Microsoft--http://www.vcnet.com/bms ]
"Resistance is futile. Open your source code and prepare for assimilation."




More information about the Bogofilter mailing list