Opened 8 years ago

Last modified 2 years ago

#51535 new defect

perl5 portgroup: revise version numbering

Reported by: mojca (Mojca Miklavec) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: portgroup Cc: dbevans (David B. Evans), jmroot (Joshua Root), larryv (Lawrence Velázquez)
Port:

Description (last modified by mojca (Mojca Miklavec))

At some point it would be nice to revise the version numbers for Perl ports.

There are some "annoying" ports like p5-pod-readme which use v1.1.2 as version string (the letter "v" being part of the version string).

This means that comparisons should be different. Perl devs say that:

  • v1.10 > v1.9, but
  • 1.10 < 1.9

I should double-check how that is in MacPorts.

The advice would be to switch to different numbers altogether and use versions like 1.001002 rather than "1.1.2" for any version comparison.

Plus, they would specify something like

perl5.setup HTML-Formatter 2.014 NIGELM/HTML-Formatter-2.14.tar.gz

where the full dist name would be part of the specification.

The upstream information should come from https://metacpan.org.

See also #50000 and https://metacpan.org/pod/Gentoo::PerlMod::Version#gentooize_version.

Change History (8)

comment:1 Changed 8 years ago by mojca (Mojca Miklavec)

Description: modified (diff)

comment:2 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

See #11873 for the previous ticket on the issue of floating point Perl module version numbers.

comment:3 Changed 8 years ago by mojca (Mojca Miklavec)

Cc: jmr@… added

Ryan, thank you for the pointer. I knew that some conversion is being done, but I wasn't 100% sure how it was done.

I'm not saying that the functionality is necessarily broken in MP at the moment, but we do need special handling for the following ports at least:

  • p5-pod-readme
  • p5-mouse

and

p5-list-uniq seems to have been updated (port version: v0.21.0, new version: 0.20)

I am slightly confused by examples like the following though:

p5-business-issn seems to have been updated (port version: 1.001, new version: 0.91)
p5-config-simple seems to have been updated (port version: 4.59, new version: 4.58)
p5-net-senderbase seems to have been updated (port version: 1.02, new version: 1.01)
p5-sys-meminfo seems to have been updated (port version: 0.98, new version: 0.91)

My attempted change was:

  • perl5-1.0.tcl

     
    252252    }
    253253
    254254    livecheck.type      regexm
    255     livecheck.url       http://search.cpan.org/dist/${perl5.module}/
    256     livecheck.regex     _gaq.push\\(\\\["_setCustomVar",5,"Release","[quotemeta ${perl5.module}]-(\[^"\]+?)\"
     255    livecheck.url       http://api.metacpan.org/release/${perl5.module}/
     256    livecheck.regex     \"name\" : \"[quotemeta ${perl5.module}]-(\[^"\]+?)\"
    257257    default livecheck.version {${perl5.moduleversion}}
    258258}
    259259

(I should have used the "version" field, but that probably wouldn't make much of a difference in this particular case.)

I'm tired of manually filtering out experimental versions returned by current regexp from CPAN, so I wanted to get a cleaner list from metacpan which the Perl developers consider the better portal nowadays.

comment:4 Changed 8 years ago by mojca (Mojca Miklavec)

I committed a change in r149129. It has some issues (listed above), but it at least avoids listing all those experimental versions that hide the real version changes. This change certainly needs some further cleanup. In particular we should figure out whether we could switch to the "version" field without having to interpret the api file (perhaps a fixed number of spaces between the "version" field would be good enough).

Version 0, edited 8 years ago by mojca (Mojca Miklavec) (next)

comment:5 Changed 8 years ago by mojca (Mojca Miklavec)

See also #51591. Maybe that should be the same ticket, I'm not sure. I'll wait for some help from other experts :)

comment:6 Changed 8 years ago by dbevans (David B. Evans)

Concerning version numbers, note that the portgroup already attempts to reversion ports to meet MacPorts procedures. On the other hand look at the documentation for the version module which attempts to take arbitrary version numbers and convert them to perl standard version objects. These converted version numbers always have a "v" prefix. If there's a choice, I'd prefer to use the official perl versions and fix our code (portgroup and otherwise) to transparently deal with any difficulties this presents. It's confusing having the MacPorts version number be different than that shown on the module homepage for instance.

I think the change to using metacpan.org by default is a good one. See #51591 for an explanation of my modifications to the portgroup to deal with consistency between version numbers used in livecheck and on homepages and to allow the use of search.cpan.org on the very small number of ports where metacpan.org either retrieves something other than the most recent version or just can find the module at all.

I believe this has addressed most if not all of the breakage that came with switching livecheck to metacpan.org.

comment:7 Changed 8 years ago by larryv (Lawrence Velázquez)

Cc: larryv@… added

Cc Me!

comment:8 Changed 2 years ago by mascguy (Christopher Nielsen)

Keywords: portgroup added

Add keyword portgroup, to pg-related tickets

Note: See TracTickets for help on using tickets.