Skip Menu |

This queue is for tickets about the CPANPLUS-Dist-RPM CPAN distribution.

Report information
The Basics
Id: 48047
Status: open
Priority: 0/
Queue: CPANPLUS-Dist-RPM

People
Owner: Nobody in particular
Requestors: ANDK [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.0.8
Fixed in: (no value)



Subject: Spec files should contain Provides: and Requires: lines
The dependency chains on CPAN can be overwhelmingly long and are subject to daily change. The rpmbuild tool is usually not up to the task of determining the provides and the requires of a package. CPANPLUS-Dist-RPM should be able to fill in the gap. I currently add to most packages a line like %define __perl_requires /bin/true and then I ask CPAN.pm for the dependencies and fill in both dependencies and the Provides lines with some copy and paste. Is there a chance that CPANPLUS-Dist-RPM learns to take over the task?
Hi Am Di 21. Jul 2009, 05:13:10, ANDK schrieb: Show quoted text
> The dependency chains on CPAN can be overwhelmingly long and are subject > to daily change. The rpmbuild tool is usually not up to the task of > determining the provides and the requires of a package. > CPANPLUS-Dist-RPM should be able to fill in the gap.
this could be a starting point: diff -ruN CPANPLUS-Dist-RPM-0.0.8-orig/lib/CPANPLUS/Dist/RPM.pm CPANPLUS-Dist-RPM-0.0.8/lib/CPANPLUS/Dist/RPM.pm --- CPANPLUS-Dist-RPM-0.0.8-orig/lib/CPANPLUS/Dist/RPM.pm 2009-01-17 21:19:29.000000000 +0100 +++ CPANPLUS-Dist-RPM-0.0.8/lib/CPANPLUS/Dist/RPM.pm 2010-08-17 10:19:22.000000000 +0200 @@ -285,7 +285,7 @@ status => $self->status, module => $self->parent, buildreqs => $self->_buildreqs, + reqs => $self->_reqs, date => do { my $d = scalar localtime; substr($d, 0, 11) . substr($d, 20) }, packager => $PACKAGER, docfiles => join(' ', @{ $self->_docfiles }), @@ -447,6 +448,16 @@ return $buildreqs; } +# generate our hashref of reqs +sub _reqs { + my $self = shift @_; + + # Handle build/test/requires + my $reqs = $self->parent->status->reqs; + + return $reqs; +} + sub _docfiles { my $self = shift @_; but it depends on: --- /usr/lib/perl5/5.10.0/CPANPLUS/Module.pm-orig 2010-03-24 12:45:09.000000000 +0100 +++ /usr/lib/perl5/5.10.0/CPANPLUS/Module.pm 2010-08-08 18:15:57.000000000 +0200 @@ -240,6 +240,15 @@ Might be undefined if the distribution didn't have any prerequisites. +=item reqs + +A hashref of reqs this distribution was found to have. Will look +something like this: + + { Carp => 0.01, strict => 0 } + +Might be undefined if the distribution didn't have any requisites. + =item signature Flag indicating, if a signature check was done, whether it was OK or @@ -330,7 +339,7 @@ return $self->_status if $self->_status; my $acc = Object::Accessor->new; - $acc->mk_accessors( qw[ installer_type dist_cpan dist prereqs + $acc->mk_accessors( qw[ installer_type dist_cpan dist prereqs reqs signature extract fetch readme uninstall created installed prepared checksums files checksum_ok checksum_value _fetch_from] ); Chris