Opened 8 years ago
Closed 8 years ago
#53335 closed defect (duplicate)
Do not allow installing ports with non-numerical revision
Reported by: | ballapete (Peter "Pete" Dyballa) | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | base | Version: | 2.3.5 |
Keywords: | Cc: | Peter_Dyballa@…, ryandesign (Ryan Carsten Schmidt) | |
Port: |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
ort outdated The following installed ports are outdated: cmake 3.7.1_0 < 3.7.2_0 can't use non-numeric string as operand of "-" while executing "expr {$installed_revision - $latest_revision}" (procedure "action_outdated" line 84) invoked from within "$action_proc $action $portlist [array get global_options]" (procedure "process_cmd" line 103) invoked from within "process_cmd $remaining_args" invoked from within "if { [llength $remaining_args] > 0 } { # If there are remaining arguments, process those as a command set exit_status [process_cmd $remaining..." (file "/opt/local/bin/port" line 5286)
and similarly:
sudo port upgrade outdated Password: can't use non-numeric string as operand of "-" while executing "expr {$installed_revision - $latest_revision}" (procedure "get_outdated_ports" line 65) invoked from within "get_${name}_ports" ("^outdated(@.*)?$" arm line 8) invoked from within "switch -regex -- $token { ^\\)$ - ^\; - ^_EOF_$ { # End of expression/cmd/file ..." (procedure "element" line 12) invoked from within "element reslist" (procedure "unaryExpr" line 17) invoked from within "unaryExpr reslist" (procedure "andExpr" line 4) invoked from within "andExpr reslist" (procedure "orExpr" line 4) invoked from within "orExpr blist" (procedure "seqExpr" line 16) invoked from within "seqExpr reslist" (procedure "portExpr" line 3) invoked from within "portExpr portlist" (procedure "process_cmd" line 93) invoked from within "process_cmd $remaining_args" invoked from within "if { [llength $remaining_args] > 0 } { # If there are remaining arguments, process those as a command set exit_status [process_cmd $remaining..." (file "/opt/local/bin/port" line 5286)
Attachments (1)
Change History (9)
comment:1 follow-up: 2 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)
Component: | ports → base |
---|---|
Description: | modified (diff) |
Keywords: | port removed |
Port: | port removed |
comment:2 Changed 8 years ago by ballapete (Peter "Pete" Dyballa)
Replying to ryandesign:
Does
port installed
work? If so, can you show us its output?
Yes, it does! It lists over 300 active packages.
comment:3 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)
Please show us the output. Perhaps put it into a file (e.g. port installed > ~/Desktop/installed_ports.txt
) and attach that file to this ticket.
comment:4 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign added |
---|
Changed 8 years ago by ballapete (Peter "Pete" Dyballa)
Attachment: | Ports-installed@macOS_Sierra_10.12.2 added |
---|
The ports installed on my Mac
comment:5 follow-up: 6 Changed 8 years ago by jmroot (Joshua Root)
Keywords: | sierra removed |
---|---|
Port: | emacs added |
So the culprit would be emacs @25.1_2a+imagemagick+x11 (active)
. It doesn't look like the emacs port in the official ports tree ever had that revision; is your emacs Portfile locally modified? Either way, you should be able to fix the problem by uninstalling emacs.
comment:6 Changed 8 years ago by ballapete (Peter "Pete" Dyballa)
Replying to jmroot:
So the culprit would be
emacs @25.1_2a+imagemagick+x11 (active)
. It doesn't look like the emacs port in the official ports tree ever had that revision; is your emacs Portfile locally modified? Either way, you should be able to fix the problem by uninstalling emacs.
Yes, that modified package, to allow GNU Emacs to use local init files and calendar, was indeed the culprit. Port was too fast upgrading so that I chose that version number.
Everything is working fine now. The ticket can be closed. Thank you!
comment:7 Changed 8 years ago by raimue (Rainer Müller)
Port: | emacs removed |
---|---|
Summary: | `port outdated` seems to fail on macOS Sierra, 10.12.2 → Do not allow installing ports with non-numerical revision |
I consider this a bug in base. port should fail and abort when trying to install a port with a non-numerical revision. The best fix would be to stop that early on and reject such an invalid revision.
comment:8 Changed 8 years ago by jmroot (Joshua Root)
Resolution: | → duplicate |
---|---|
Status: | new → closed |
In that case, dupe of #26486.
It sounds like maybe you have a port installed whose
revision
is not a number.revision
is supposed to always be a number, but nothing prevents portfile authors from committingrevision
s that are not numbers.Does
port installed
work? If so, can you show us its output?