Bug 461350 - cpanspec nearly always misses the BuildRequires: perl(Test::More)
cpanspec nearly always misses the BuildRequires: perl(Test::More)
Status: ASSIGNED
Product: Fedora
Classification: Fedora
Component: cpanspec (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Petr Šabata
Fedora Extras Quality Assurance
: FutureFeature, Reopened, Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-06 05:48 EDT by Daniel Berrange
Modified: 2015-02-24 10:17 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-12-18 01:22:14 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Daniel Berrange 2008-09-06 05:48:48 EDT
Description of problem:
cpanspec nearly always misses the BuildRequires: perl(Test::More)  for test suite files.

I imagine this is because the 'use' statement often has trailing arguments

  use Test::More tests => 19;

instead of a more usual 

  use Test::More;

It'd be very helpful if cpanspec picked up this style, because then nearly all its autogenerated specs would be correct.


Version-Release number of selected component (if applicable):
cpanspec-1.77-1.fc9.noarch

How reproducible:
Often

Steps to Reproduce:
1. cpanspec Data-Section-0.005.tar.gz
2.
3.
  
Actual results:
Missing BuildRequires: perl(Test::More)

Expected results:
All BuildRequires are correct

Additional info:
Comment 1 Bug Zapper 2008-11-25 21:58:46 EST
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 2 Steven Pritchard 2009-01-16 16:33:59 EST
Sorry I missed this before...

(In reply to comment #0)
> cpanspec nearly always misses the BuildRequires: perl(Test::More)  for test
> suite files.
> 
> I imagine this is because the 'use' statement often has trailing arguments
> 
>   use Test::More tests => 19;
> 
> instead of a more usual 
> 
>   use Test::More;

Actually, I wish it were that simple.  cpanspec only looks at CPAN metadata.  If a dependency isn't in META.yml or Makefile.PL, it won't be picked up.  Unfortunately, it seems like hardly anyone bothers to list Test::More as a dependency.

The only way to fix this would be to use something like Module::ScanDeps, but I've never been able to decide if that would be the right thing to do.
Comment 3 Daniel Berrange 2009-01-18 13:11:23 EST
THe CPANTS test suite makes use of Module::ExtractUse which seems to do a pretty good job (at least on the modules I maintain it appears accurate). The CPANTS results also suggest that on the order of 1/3 of all modules have missing PreReqs declared in their META.yml/Makefile.PL vs their actual use. So, IMHO it'd be worth making use of module like this to extract usage. 

Perhaps if this detected modules not declared in the META.yml, it could add the BR to the RPM spec, along with a comment informing the packager that they should double check this module usage manually.
Comment 4 Steven Pritchard 2009-01-21 20:53:21 EST
(In reply to comment #3)
> THe CPANTS test suite makes use of Module::ExtractUse which seems to do a
> pretty good job (at least on the modules I maintain it appears accurate). The
> CPANTS results also suggest that on the order of 1/3 of all modules have
> missing PreReqs declared in their META.yml/Makefile.PL vs their actual use. So,
> IMHO it'd be worth making use of module like this to extract usage. 

How about just extracting module use from the tests?  The current version in CVS ( http://cpanspec.cvs.sourceforge.net/viewvc/*checkout*/cpanspec/cpanspec/cpanspec ) has a simple stab at this idea.

Interestingly, see how badly it blows up on Module::ExtractUse's tests.  :-)

> Perhaps if this detected modules not declared in the META.yml, it could add the
> BR to the RPM spec, along with a comment informing the packager that they
> should double check this module usage manually.

That would take more code, but it would probably be better in the long run...
Comment 5 Bug Zapper 2009-11-18 03:21:49 EST
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '10'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 10's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 10 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 6 Bug Zapper 2009-12-18 01:22:14 EST
Fedora 10 changed to end-of-life (EOL) status on 2009-12-17. Fedora 10 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 7 Steven Pritchard 2010-12-07 15:10:29 EST
Re-opening...  I haven't pushed a version to Fedora that adds the "fix" for this yet.
Comment 8 Fedora End Of Life 2013-04-03 15:57:35 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19
Comment 9 Fedora Admin XMLRPC Client 2014-11-10 10:34:06 EST
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 10 Fedora Admin XMLRPC Client 2014-11-10 10:51:50 EST
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 11 Fedora End Of Life 2015-01-09 16:37:21 EST
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Note You need to log in before you can comment on or make changes to this bug.