Re: Perl RPM Requires/Provides

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 16, 2009 at 12:51 PM, Dave Cross <dave@xxxxxxxxxxx> wrote:
>
> As I understand it, the current version of rpmbuild works generates the
> Requires and Provides definitions for an RPM by parsing the Perl code and
> working out which modules are used (for Requires) or defined (for Provides).

Yep.  It's not a very sophisticated approach, but works.  (mostly.)

> Can someone please confirm that these are the files that I need to work on
> and (even better) point me at some documentation for how these programs are
> called - what inputs and outputs are expected, stuff like that.
>
> Also, is there a way to provide my own replacement for these files without
> just overwriting them. I'd rather not fiddle directly with system supplied
> code.

As tibbs pointed out (obliquely :)), take a look at the
%__perl_provides and %__perl_requires macros.  You can override them
either in the specs themselves, or in $HOME/.rpmmacros.  The inputs
and outputs can be seen from the filtering page: files are passed to
the scripts, scanned, and deps emitted on stdout.  Note that these
scripts are only ever passed files that 'file' thinks is Perl, and
META.yml is never passed in any case (as it's never installed anywhere
in the %buildroot)... Not that it matters if you're rewriting it.  If
you're using a different mechanism, setting those macros to %{nil}
should be enough to disable the Perl dependency generation w/o
impacting the rest of the system.

I've fiddled with this a bit, mainly with trying to get RPM itself to
parse and pull from META.yml via a lua scriptlet -- nothing serious
has come of it so far.  I've lately abandoned it largely in favor of
automatically updating spec file dependencies based off META.yml as
part of an upgrade process.  It's not perfect, but it's been working
well so far.

Good luck!  :)

                                       -Chris
-- 
Chris Weyl
Ex astris, scientia

--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
Fedora-perl-devel-list mailing list
Fedora-perl-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-perl-devel-list

[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Legacy Announce]     [Fedora PHP Devel]     [Kernel Devel]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Big List of Linux Books]     [Gimp]     [Yosemite Information]
  Powered by Linux