New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XSLoader meta information incorrect #15493
Comments
From pierre.vigier@gmail.comHi, Module XSLoader META information do not contains the "provides" entry, with the package and the version. For reference, the content of the issue is included herebelow Pierre With the following cpanfile: requires 'List::MoreUtils'; [pierre:~/tmp/xs]> carton install --deployment # carton snapshot format: version 1.0 |
From @karenetheridgeOn Wed Aug 03 21:57:17 2016, pierre.vigier@gmail.com wrote:
'provides' is not a required key in the CPAN::Meta specification: https://metacpan.org/pod/CPAN::Meta::Spec#provides cpanm fills in provides (sometimes incorrectly) in its own copy of metadata when it installs a distribution. It gets it wrong for XSLoader for some reason (it appears to be getting confused by the layout of .pm, .PL and .xs files). The XSLoader distribution could possibly have its metadata tweaked to help out cpanm, but there is no bug here. |
The RT System itself - Status changed from 'new' to 'open' |
From @karenetheridgeI have prepared a suitable patch. |
From @karenetheridge0001-add-provides-metadata-for-XSLoader-RT-138836.patchFrom 3ee69687408328b28587c741d98e501437ba066d Mon Sep 17 00:00:00 2001
From: Karen Etheridge <ether@cpan.org>
Date: Fri, 5 Aug 2016 10:16:40 -0700
Subject: [PATCH] add "provides" metadata for XSLoader (RT#138836)
This avoids confusing tools like cpanm and carton which use 'provides'
metadata, and are not able to infer the correct data here because
XSLoader_pm.PL is used to generate XSLoader.pm, but then XSLoader.pm is
deleted before cpanm can see it.
diff --git a/dist/XSLoader/Makefile.PL b/dist/XSLoader/Makefile.PL
index 899cc89..bc35843 100644
--- a/dist/XSLoader/Makefile.PL
+++ b/dist/XSLoader/Makefile.PL
@@ -45,13 +45,26 @@ WriteMakefile(
'Test::More' => '0.47',
},
META_MERGE => {
- resources => {
- repository => 'git://perl5.git.perl.org/perl.git',
- license => 'http://dev.perl.org/licenses/',
+ 'meta-spec' => { version => 2 },
+ dynamic_config => 0,
+ resources => {
+ repository => {
+ type => 'git',
+ url => 'git://perl5.git.perl.org/perl.git',
+ },
homepage => 'https://metacpan.org/module/XSLoader',
- irc => 'irc://irc.perl.org/#p5p',
- mailinglist => 'http://lists.perl.org/list/perl5-porters.html',
- bugtracker => "https://rt.perl.org/rt3/Search/Results.html?Query=Queue='perl5' AND Content LIKE 'module=XSLoader' AND (Status='open' OR Status='new' OR Status='stalled')",
+ x_IRC => 'irc://irc.perl.org/#p5p',
+ x_MailingList => 'http://lists.perl.org/list/perl5-porters.html',
+ bugtracker => {
+ mailto => 'perlbug@perl.org',
+ web => "https://rt.perl.org/rt3/Search/Results.html?Query=Queue='perl5' AND Content LIKE 'module=XSLoader' AND (Status='open' OR Status='new' OR Status='stalled')",
+ },
+ },
+ provides => {
+ 'XSLoader' => {
+ file => 'XSLoader_pm.PL',
+ version => ${$PACKAGE.'::VERSION'},
+ },
},
},
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
--
2.8.3
|
From @cpansproutOn Fri Aug 05 10:21:09 2016, ether wrote:
Thank you. I have applied it as 0d9b031. -- Father Chrysostomos |
@cpansprout - Status changed from 'open' to 'pending release' |
From pierre.vigier@gmail.comThank you for your help. On Sat, Aug 6, 2016 at 2:25 AM Father Chrysostomos via RT <
|
From @maddingue[ to sum up here what I said in the github ticket of carton There's a small mistake in the patch, in that ${$PACKAGE.'::VERSION'} actually is the current version of XSLoader, not the one about to be installed. The attached patch, corresponding to the version 0.24 just uploaded on the CPAN, makes it more clear by creating two vars: $CURRENT_VERSION and $NEW_VERSION. -- |
From @khwilliamsonThank you for filing this report. You have helped make Perl better. With the release today of Perl 5.26.0, this and 210 other issues have been Perl 5.26.0 may be downloaded via: If you find that the problem persists, feel free to reopen this ticket. |
@khwilliamson - Status changed from 'pending release' to 'resolved' |
Migrated from rt.perl.org#128836 (status was 'resolved')
Searchable as RT128836$
The text was updated successfully, but these errors were encountered: