Opened 10 years ago

Closed 10 years ago

#43727 closed defect (wontfix)

perl5 1.0 portgroup cannot handle version numbers with characters

Reported by: mf2k (Frank Schima) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: Cc:
Port:

Description

The perl5 1.0 portgroup has a bug where it cannot handle a version number with non-numeric characters in it. See the p5-sgmlspm port as an example. The version it produced was:

  p5.16-sgmlspm @1.3.{}_0 (active)

The issue exists in proc perl5_convert_version.

Attachments (1)

patch-port-group-per5-version-chars.diff (873 bytes) - added by pixilla (Bradley Giesbrecht) 10 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

I guess the reason for this is that perl module version numbers are not supposed to have non-numeric characters in them. The author of the affected perl module should be advised of this.

comment:2 in reply to:  1 Changed 10 years ago by danielluke (Daniel J. Luke)

Replying to ryandesign@…:

I guess the reason for this is that perl module version numbers are not supposed to have non-numeric characters in them. The author of the affected perl module should be advised of this.

Looks like the last update to that module on CPAN is from 1995, so it seems unlikely that it will get updated/fixed.

Changed 10 years ago by pixilla (Bradley Giesbrecht)

comment:3 Changed 10 years ago by pixilla (Bradley Giesbrecht)

I wrote this patch a while back, seems to work ok.

$ port -q installed p5.16-sgmlspm
  p5.16-sgmlspm @1.30.0ii_1 (active)

comment:4 Changed 10 years ago by mf2k (Frank Schima)

Unfortunately, I do not think that version number is correct for p5-sgmlspm. According to that port's homepage, the version is "1.03ii". In the p5-sgmlspm Portfile, I manually set it to "1.03ii.0".

comment:5 Changed 10 years ago by jmroot (Joshua Root)

Component: baseports
Resolution: wontfix
Status: newclosed

Yeah, this isn’t really a bug, the version number is invalid. Perl rejects it:

% perl -Mversion -e 'print version->parse("1.03ii")->normal'
Invalid version format (non-numeric data) at -e line 1.

I’d suggest just setting your own version in such cases.

Note: See TracTickets for help on using tickets.