Filtering requires/provides

Steven Pritchard steve at
Wed Mar 8 19:20:27 UTC 2006

I just want to throw this idea out for everyone to consider.  I'm not
100% happy with it, but I can't say I'm 100% happy with any other
solution I've seen.

Let me state for the record that TMTOWTDI, but I'm looking for
something that I can script in cpanspec, that doesn't litter
%_sourcedir, that honors %__perl_requires, and that isn't *too* ugly.

I'm using the perl-Kwiki-Raw package (not yet submitted, but available
at as my test.
In it, I need to filter a dependency on "perl(mixin)".

First, I added the following to the spec:

  %global real_perl_requires %{__perl_requires}
  %define __perl_requires %{SOURCE1}

Then, in %prep, added the following:

  sed -i -e 's,@@PERL_REQ@@,%{real_perl_requires},' %{SOURCE1}

The looks like this:

  @@PERL_REQ@@ "$@" | sed -e '/^perl(mixin)$/d'

Yes, this changes, so any source rpm built from
this will have @@PERL_REQ@@ pre-substituted, but is that really a
major problem?

Steven Pritchard - K&S Pritchard Enterprises, Inc.
Email: steve at   
Phone: (618)398-3000               Mobile: (618)567-7320

More information about the Fedora-perl-devel-list mailing list