Bug 461350 - cpanspec nearly always misses the BuildRequires: perl(Test::More)
Summary: cpanspec nearly always misses the BuildRequires: perl(Test::More)
Keywords:
Status: ASSIGNED
Alias: None
Product: Fedora
Classification: Fedora
Component: cpanspec
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Michal Josef Spacek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-09-06 09:48 UTC by Daniel Berrangé
Modified: 2023-01-04 00:08 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-12-18 06:22:14 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Daniel Berrangé 2008-09-06 09:48:48 UTC
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-26 02:58:46 UTC
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 21:33:59 UTC
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 Berrangé 2009-01-18 18:11:23 UTC
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-22 01:53:21 UTC
(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 08:21:49 UTC
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 06:22:14 UTC
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 20:10:29 UTC
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 19:57:35 UTC
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 15:34:06 UTC
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 15:51:50 UTC
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 21:37:21 UTC
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.

Comment 12 Fedora Admin user for bugzilla script actions 2023-01-04 00:08:30 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.


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