Opened 7 years ago

Closed 7 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)

Ports-installed@macOS_Sierra_10.12.2 (9.9 KB) - added by ballapete (Peter "Pete" Dyballa) 7 years ago.
The ports installed on my Mac

Download all attachments as: .zip

Change History (9)

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

Component: portsbase
Description: modified (diff)
Keywords: port removed
Port: port removed

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 committing revisions that are not numbers.

Does port installed work? If so, can you show us its output?

comment:2 in reply to:  1 Changed 7 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 7 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 7 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign added

Changed 7 years ago by ballapete (Peter "Pete" Dyballa)

The ports installed on my Mac

comment:5 Changed 7 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 in reply to:  5 Changed 7 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 7 years ago by raimue (Rainer Müller)

Port: emacs removed
Summary: `port outdated` seems to fail on macOS Sierra, 10.12.2Do 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 7 years ago by jmroot (Joshua Root)

Resolution: duplicate
Status: newclosed

In that case, dupe of #26486.

Note: See TracTickets for help on using tickets.