Opened 6 years ago

Closed 6 years ago

#48165 closed defect (fixed)

obsolete-1.0: uses replaced_by without checking for it

Reported by: jbrinchmann@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.3.3
Keywords: Cc:
Port: obsolete-1.0

Description (last modified by ryandesign (Ryan Schmidt))

I'm on Yosemite (10.10.3) and was trying to upgrade my MacPorts installation. I followed the instructions at wiki:Migration. For the sudo port clean all command I ran into an error:

--->  Cleaning capstone
Error: Unable to open port: can't read "replaced_by": no such variable

I then ran the clean explicitly on all installed packages and that completed without problems.

When trying to run restore_ports.tcl, however, the result was a failure:

> sudo ./restore_ports.tcl myports.txt
can't read "replaced_by": no such variable
    while executing
"default long_description "This port has been replaced by ${replaced_by}.""
    (file "/opt/local/var/macports/sources/" line 52)
    invoked from within
"source /opt/local/var/macports/sources/"
    ("uplevel" body line 1)
    invoked from within
"uplevel "source $groupFile""
    (procedure "PortGroup" line 20)
    invoked from within
"PortGroup               obsolete 1.0"
    (file "Portfile" line 4)
    invoked from within
"source Portfile"
    invoked from within
"$workername eval source Portfile"
    (procedure "mportopen" line 41)
    invoked from within
"mportopen $portInfo(porturl) [list subport $portInfo(name)] $variantInfo"
Unable to open port 'CarbonHeaders': can't read "replaced_by": no such variable
    while executing
"dependenciesForPort $name $variants"
    (procedure "sort_ports" line 46)
    invoked from within
"sort_ports $portList"
    invoked from within
"set operationList [sort_ports $portList]"
    (file "./restore_ports.tcl" line 285)

This was a bit too obscure an error for me.

Change History (3)

comment:1 Changed 6 years ago by jbrinchmann@…

Cc: jbrinchmann@… added

Cc Me!

comment:2 Changed 6 years ago by ryandesign (Ryan Schmidt)

Cc: jbrinchmann@… removed
Component: portsbase
Description: modified (diff)

The replaced_by keyword was added in MacPorts 1.8.0, released August 2009. The error message indicates you are running a version of MacPorts older than that. Before attempting to reinstall ports, you should upgrade to the latest version of MacPorts.

comment:3 in reply to:  2 Changed 6 years ago by larryv (Lawrence Velázquez)

Component: baseports
Port: obsolete-1.0 added
Resolution: fixed
Status: newclosed
Summary: restore_ports.tcl script fails with "can't read "replaced_by": no such variable"obsolete-1.0: uses replaced_by without checking for it

Actually, I caused this unintentionally with r137979. Should be fixed with r138000.

Note: See TracTickets for help on using tickets.