Skip Menu |

This queue is for tickets about the CPAN-Site CPAN distribution.

Report information
The Basics
Id: 49795
Status: resolved
Priority: 0/
Queue: CPAN-Site

People
Owner: MARKOV [...] cpan.org
Requestors: matisse [...] spamcop.net
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.02
Fixed in: (no value)



Subject: CPAN::Site::Index::inspect_archive() sometimes passes incorrect value to package_on_usual_location()
In CPAN::Site::Index around lines 192/193: $file->is_file && $fn =~ m/\.pm$/i && package_on_usual_location $fn or next; the value $fn will sometimes not be correct, because of differences in how the tarball was created. Sometimes $fn will have only the file name when it should have a longer path (relative to the top of the tarball.) $fn comes from: $file->name where $file is an Achive::Tar::File object. It would be better if the value passed to package_on_usual_location() was $file->full_path for example: 190 foreach my $file ($arch->get_files) 191 { my $fn = $file->full_path; 192 $file->is_file && $fn =~ m/\.pm$/i && package_on_usual_location $fn 193 or next; 194 collect_package_details $dist, $file; 195 }
CC: undisclosed-recipients: ;
Subject: Re: [rt.cpan.org #49795] CPAN::Site::Index::inspect_archive() sometimes passes incorrect value to package_on_usual_location()
Date: Fri, 18 Sep 2009 00:03:51 +0200
To: Matisse Enzer via RT <bug-CPAN-Site [...] rt.cpan.org>
From: Mark Overmeer <solutions [...] overmeer.net>
* Matisse Enzer via RT (bug-CPAN-Site@rt.cpan.org) [090917 20:50]: Show quoted text
> Thu Sep 17 16:50:47 2009: Request 49795 was acted upon. > Transaction: Ticket created by MATISSE > Subject: CPAN::Site::Index::inspect_archive() sometimes passes incorrect > value to package_on_usual_location()
Show quoted text
> $fn comes from: > $file->name > It would be better if the value passed to package_on_usual_location() was > $file->full_path
I had already hope that you would test the code with your weird archives ;-) Of course, your change is included in the next release. -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
Subject: Re: [rt.cpan.org #49795] CPAN::Site::Index::inspect_archive() sometimes passes incorrect value to package_on_usual_location()
Date: Thu, 17 Sep 2009 17:37:44 -0700
To: bug-CPAN-Site [...] rt.cpan.org
From: Matisse Enzer <matisse [...] matisse.net>
On Sep 17, 2009, at 3:04 PM, Mark Overmeer via RT wrote: Show quoted text
> I had already hope that you would test the code with your weird > archives ;-) Of course, your change is included in the next release.
Thank you! And I apologize for not providing a test case to catch regressions in the future. I will try and do that early next month. -M
Mark fixed this in 1.03