#44649 closed defect (fixed)
mpv portfile does not parse
Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | Ionic (Mihai Moldovan) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.3.1 |
Keywords: | haspatch | Cc: | |
Port: | mpv |
Description
On Mac OS X 10.4:
Can't map the URL 'file://.' to a port description file ("expected boolean value but got "${os.major} == 10 && ${os.minor} >= 3"").
Change History (10)
comment:1 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
comment:2 Changed 10 years ago by larryv (Lawrence Velázquez)
Strictly speaking, the grouping isn’t necessary at all, since Tcl uses C-esque operator precedence (logical-AND binds more tightly than logical-OR). I suppose it does have some readability value.
comment:3 follow-up: 4 Changed 10 years ago by Ionic (Mihai Moldovan)
Isn't TCL fun.
Yes, I prefer grouping for readability/understandability.
Feel free to push, Ryan.
May I ask how you got that? Neither portindex
nor port
itself complained with my original code.
On the other hand, are you sure this 10.4 box uses latest base? ${os.minor}
was introduced only recently with 2.3.0 IIRC.
comment:4 follow-up: 5 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | haspatch added |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Replying to ionic@…:
Isn't TCL fun.
Quite!
Yes, I prefer grouping for readability/understandability.
Feel free to push, Ryan.
May I ask how you got that? Neither
portindex
norport
itself complained with my original code.
I just updated my ports tree with "sudo port -v sync
" as usual and noticed the parse failure in the portindex
output, then went to investigate. Are you saying you tested on 10.6 or earlier and didn't see this error?
On the other hand, are you sure this 10.4 box uses latest base?
${os.minor}
was introduced only recently with 2.3.0 IIRC.
Yes, it's using 2.3.1.
comment:5 Changed 10 years ago by larryv (Lawrence Velázquez)
Replying to ryandesign@…:
Yes, it's using 2.3.1.
Is this related to Tcl version? Doesn’t 2.3.1 bundle Tcl 8.5?
comment:6 follow-up: 7 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
Yes, MacPorts 2.3 and up bundle Tcl 8.5 so MacPorts is now using the same version of Tcl on all versions of OS X.
comment:7 Changed 10 years ago by larryv (Lawrence Velázquez)
Given the unified Tcl, I guess I’m not understanding why this would fail on Tiger but not on more recent OSes.
comment:8 follow-up: 9 Changed 10 years ago by Ionic (Mihai Moldovan)
Maybe due to short circuit evaluation. I have only tested on 10.9, which falls into the first branch and doesn't check the second one.
comment:9 Changed 10 years ago by larryv (Lawrence Velázquez)
That sounds right. I was thinking that later Tcl started accepting braces for grouping, or something.
comment:10 Changed 10 years ago by Ionic (Mihai Moldovan)
From MacPort's tclsh:
% if {"a" eq "a" || {"a" eq "b"}} { puts foo } else { puts bar } foo 0 % if {{"a" eq "a"} || {"a" eq "b"}} { puts foo } else { puts bar } expected boolean value but got ""a" eq "a""
This seems to fix it: