[MacPorts] #28084: Registry error for ports with underscore ('_') in version
MacPorts
noreply at macports.org
Sat Jan 22 00:20:39 PST 2011
#28084: Registry error for ports with underscore ('_') in version
---------------------------------+------------------------------------------
Reporter: ken@… | Owner: macports-tickets@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: base | Version: 1.9.2
Keywords: registry version | Port:
---------------------------------+------------------------------------------
Comment(by ken@…):
Replying to [comment:6 jmr@…]:
> Actually I do see this for the ports you mention, but not for all ports
with an underscore in the version.
I believe I have identified the issue. It's the underscore '''and the
dash''' in "2.2_20050523-0". iozone's version is 3_373, which has no
dash.
Now, look at proc decode_spec
(/opt/local/share/macports/Tcl/registry2.0/registry_util.tcl:55):
{{{
proc decode_spec {specifier version revision variants} {
upvar 1 $version ver $revision rev $variants var
return [regexp {^([^+]+?)(_(\d+)(([-+][^-+]+)*))?$} $specifier - ver -
rev v
ar]
}
}}}
Experimenting interactively with that regexp:
{{{
$ tclsh
% echo [regexp {^([^+]+?)(_(\d+)(([-+][^-+]+)*))?$} "2.2_20050523-0_0" -
ver - rev var]
1
% echo $ver
2.2
% echo $rev
20050523
% echo $var
-0_0
% echo [regexp {^([^+]+?)(_(\d+)(([-+][^-+]+)*))?$} "3_373_0" - ver - rev
var]
1
% echo $ver
3_373
% echo $rev
0
% echo $var
%
}}}
--
Ticket URL: <https://trac.macports.org/ticket/28084#comment:8>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list