Created attachment 365898 [details, diff] g-cpan-0.16.4-v.patch g-cpan fails to generate correct ebuilds when perl module version begins with "v". It does most of work correctly, but generated ebuild tries to download -X.Y.Z.tar.gz instead of -vX.Y.Z.tar.gz and fails while "digest". Attached patch solve this issue.
Seem like the similar fix comes with https://github.com/gentoo-perl/g-cpan/commit/c464ccf61b23942a591110f11386992f9e6fcedd Could you please provide some examples for check?
ping
Sorry, I've switched to installing system-wide modules using cpanm to /usr/local/ and don't use g-cpan anymore.
The thing you're looking for is when upstream define versions like this: https://metacpan.org/release/URI-Encode Its quite easy to handle if your workflow is right. 1. Copy VERSION token from upstream DISTNAME verbatim as DIST_VERSION ( EAPI6 ) 2. Run upstream VERSION token verbatim through Gentoo::PerlMod::Version. 3. Stash that resulting number as PV on the filename. The rest happens pretty much on its own. My local "pre-bump" script basically has this tiny block of code in it, and all I have to do is pass upstreams version verbatim: > use Gentoo::PerlMod::Version qw( gentooize_version ); > > my $catpkg = cwd_cat_pkg( repo, cwd() ); > my $version = args_version( \@ARGV ); ###### > my $gv = gentooize_version( $version, { lax => 1 } ); ####### > my $basename = "$catpkg->{package}-$gv.ebuild"; ######## > my $basedir = path(repo, $catpkg->{category}, $catpkg->{package} ); > my $destfile = $basedir->child($basename); > > my $template = get_newest_ebuild( repo, $catpkg->{category}, $catpkg->{package} ); > $template = fix_year( $template, 2016 ); > $template = force_eapi6($template); > $template = set_version( $template, $version ); ###### <-- this just sets DIST_VERSION to $version > $destfile->spew_raw($template); The only hard part really is working out "what is the dist version" from upstream ( tip: you can't rely on the contents of META.* for this, its wrong often enough to be a problem ) If you're parsing an arbitrary "URL To Tarball" with this however, it should be straight forward: https://metacpan.org/pod/CPAN::DistnameInfo I believe that returns "version" in the form you want consistently. Note: lax => 1 will automatically turn on normalizing -TRIAL and x.yy_zz style alphas, without it, those types are errors. HTH
@Kent not really good example :) * Scanning /usr/portage for URI-Encode * Found ebuild for CPAN name URI-Encode * Ebuild already exists for URI-Encode (dev-perl/URI-Encode) Thank you for significant information. I'll keep it in mind. You are so aware as always ;) As I stated above I fixed similar issue some time ago for #355619. Thats why I need more examples to test. @Alex I will be pleasure if you may provide me some modules names what was issue for you. I want to know if it is still an issue for current version.
(In reply to Sergiy Borodych from comment #5) > @Alex I will be pleasure if you may provide me some modules names what was > issue for you. 2.5 year later? My memory isn't THAT good. :) > I want to know if it is still an issue for current version. I've just tested g-cpan on CGI::Stateless - everything looks good for me, so I think we can close this issue.
Please close on this :)