Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#51591 closed defect (fixed)

perl5 modules: problems with livecheck versions

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

Description (last modified by mojca (Mojca Miklavec))

After switching to livecheck from metacpan in r149129 I'm experiencing problems with figuring out the latest version number at least for the following modules (but there may be more):

This needs two-fold handling:

  • the code should probably throw an error (see also r127797)
  • we should identify the reason behind the problem for each individual module and report it upstream, as is the case for Config::Simple

See also #51535.

Change History (7)

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

Description: modified (diff)

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

Description: modified (diff)

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

Cc: devans@… jmr@… added
Owner: changed from devans@… to macports-tickets@…

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

Description: modified (diff)

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

Description: modified (diff)

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

Resolution: fixed
Status: newclosed

I've made some changes to the perl5 port group to help with this. The thing to realize is that search.cpan.org and api.metacpan.org are two different search engines but they both operate on the same CPAN repository. metacpan has some advantages over the traditional search.cpan.org but is not perfect and it is acknowledged that there are cases where search.cpan.org works better but its hard to tell why because, while the source for metacpan is open, the source for search.cpan.org is not.

After getting all the perl modules up to date after my vacation, I found 3 categories of problems to address of which the subject of this ticket is one.

1) found by search.cpan but not by metacpan

Error: cannot check if was updated (The requested URL returned error: 404 Not Found)
Error: cannot check if p5-pgtop was updated (The requested URL returned error: 404 Not Found)
Error: cannot check if p5-podtohtml was updated (The requested URL returned error: 404 Not Found)
Error: cannot check if p5-sgmlspm was updated (The requested URL returned error: 404 Not Found)

2) search.cpan version > metacpan version  (this ticket)

p5-business-issn seems to have been updated (port version: 1.001, new version: 0.91)
p5-class-dbi-pg seems to have been updated (port version: 0.09, new version: 0.08)
p5-config-simple seems to have been updated (port version: 4.59, new version: 4.58)
p5-list-uniq seems to have been updated (port version: v0.21.0, new version: 0.20)
p5-net-senderbase seems to have been updated (port version: 1.02, new version: 1.01)
p5-svg-graph seems to have been updated (port version: 0.04, new version: 0.02)
p5-sys-meminfo seems to have been updated (port version: 0.98, new version: 0.91)

3) metacpan version > search.cpanversion

p5-attribute-handlers seems to have been updated (port version: 0.96, new version: 0.99)
p5-class-makemethods seems to have been updated (port version: 1.009, new version: 1.01)
p5-mail-sender seems to have been updated (port version: 0.900003, new version: 0.901)
p5-net-ftpserver seems to have been updated (port version: 1.122, new version: 1.125)

Category 1 & 2 address ports that are better served by search.cpan.org than metacpan.org. Category 3 is where metacpan.org works better.

To address these issues, I've made two changes to the perl5 port group:

In r150080, I changed the default homepage to use metacpan.org to match livecheck. This fixed the problem associated with Category 3 where previously the metacpan livecheck (which was the correct latest version) disagreed with the search.cpan.org homepage as to module version.

In r150321, I added an additional boolean option (perl5.use_search_cpan_org) to perl5.setup that allows one to specify that search.cpan.org be used instead of metacpan.org. The default here is false, use metacpan.org, which works best for the vast majority on ports. But for the few ports in Category 1 & 2, setting this option to yes in the Portfile fixes the problem by using search.cpan.org for livecheck and also for the homepage so that again homepage and livecheck agree on latest version.

This is an empirical approach, not an analytical one but seems to fix the problems at hand.

From what I can tell, many of these ports are older ones that may not provide all the metadata that metacpan is looking for and I suspect have been special cased in search.cpan.org but I haven't done the work to be able to see exactly what is missing or what specifically metacpan is looking for. As you say, getting the upstream author to fix any deficiencies so that the offending ports are correctly indexed by metacpan would be the best solution.

After applying these changes to the portgroup and adjusting the various problem ports, the only livecheck failure is p5-mecab which is a different issue altogether (#47338).

For now, calling this fixed.

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

BTW, metacpan.org gives some guidance on why it doesn't always work here.

Note: See TracTickets for help on using tickets.