Opened 7 weeks ago

Closed 7 weeks ago

Last modified 7 weeks ago

#70903 closed defect (fixed)

port restore --last: process_cmd failed: can't read "variants": no such variable

Reported by: ShadSterling (Shad Sterling) Owned by: jmroot (Joshua Root)
Priority: Normal Milestone: MacPorts 2.10.2
Component: base Version: 2.10.1
Keywords: Cc:
Port: mpv

Description

2018 Intel macbook just upgraded to Sequoia, repeating port restore --last after #70869 was fixed fails before attempting to install any ports.

Output of port selfupdate; port -v -d restore --last ends with

DEBUG: Dependency calculation for port mpv
DEBUG: Opening port in directory: /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/multimedia/mpv
DEBUG: OS darwin/24.0.0 (macOS 15.0) arch i386
DEBUG: Sourcing PortGroup github 1.0 from /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/_resources/port1.0/group/github-1.0.tcl
DEBUG: Re-registering default for configure.cmd
DEBUG: Re-registering default for configure.pre_args
DEBUG: Re-registering default for build.dir
DEBUG: Re-registering default for build.cmd
DEBUG: Re-registering default for build.target
DEBUG: Re-registering default for destroot.cmd
DEBUG: Re-registering default for destroot.post_args
DEBUG: Sourcing PortGroup meson 1.0 from /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/_resources/port1.0/group/meson-1.0.tcl
DEBUG: Sourcing PortGroup compiler_blacklist_versions 1.0 from /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/_resources/port1.0/group/compiler_blacklist_versions-1.0.tcl
DEBUG: Sourcing PortGroup legacysupport 1.1 from /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/_resources/port1.0/group/legacysupport-1.1.tcl
DEBUG: Sourcing PortGroup active_variants 1.1 from /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/_resources/port1.0/group/active_variants-1.1.tcl
DEBUG: Re-registering default for extract.rename
DEBUG: Re-registering default for livecheck.url
DEBUG: Re-registering default for livecheck.regex
DEBUG: Sourcing PortGroup xcodeversion 1.0 from /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/_resources/port1.0/group/xcodeversion-1.0.tcl
DEBUG: compiler clang 1600.0.26.3 not blacklisted because it doesn't match {clang < 700}
DEBUG: universal_variant is false, so not adding the default universal variant
DEBUG: Executing variant python312 provides python312
DEBUG: Executing variant screenshot provides screenshot
DEBUG: Executing variant network provides network
Error: mpv: Variant network conflicts with network_ytdlp
DEBUG: process_cmd failed: can't read "variants": no such variable
    while executing
"ui_error "Unable to open port '$portname' with variants '$variants': $result""
    (procedure "resolve_dependencies" line 96)
    invoked from within
"resolve_dependencies $snapshot $include_unrequested"
    (procedure "restore_state" line 3)
    invoked from within
"restore_state $snapshot $include_unrequested"
    (procedure "restore::main" line 66)
    invoked from within
"restore::main $opts"
    (procedure "macports::restore_main" line 10)
    invoked from within
"macports::restore_main $opts"
    (procedure "action_restore" line 5)
    invoked from within
"$action_proc $action $portlist [array get global_options]"
    (procedure "process_cmd" line 126)
    invoked from within
"process_cmd $remaining_args"
    ("try" body line 3)
Error: process_cmd failed: can't read "variants": no such variable

Change History (7)

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

Summary: `port restore --last` crashes while Computing dependency orderport restore --last: process_cmd failed: can't read "variants": no such variable

There's no crash; there's just an error message.

comment:2 Changed 7 weeks ago by ShadSterling (Shad Sterling)

without -v -d the output ends with

===>  Computing dependency order
      [                                        ]  82.6 %Warning: All compilers are either blacklisted or unavailable; defaulting to first fallback option
Warning: All compilers are either blacklisted or unavailable; defaulting to first fallback option
      [                                        ]  90.1 %Error: mpv: Variant network conflicts with network_ytdlp
Error: process_cmd failed: can't read "variants": no such variable

Before #70869 was fixed there were lots of errors, none of which brought the whole thing to a halt without any attempts to install anything or any further output. (I don't expect that fix was related, it's just what prompted the retry)

Now it never tries to install anything, it ends there, leaving everything deactivated, which leaves my system nearly unusable.

Is that really the intended behavior?

comment:3 Changed 7 weeks ago by jmroot (Joshua Root)

Port: mpv added

Nobody said this was intended behaviour. There are two problems here, one in the mpv port and one in base's handling of the former.

comment:4 Changed 7 weeks ago by jmroot (Joshua Root)

In 3899384c03205111f431f53a22498f3435a3e275/macports-ports (master):

mpv: don't set conflicting default variant

See: #70903

comment:5 Changed 7 weeks ago by jmroot (Joshua Root)

Owner: set to jmroot
Resolution: fixed
Status: newclosed

In 202d58b4f49e6215b1b806d7d859953fe8a95ab1/macports-base (master):

restore: fix error after failing to open port

Closes: #70903

comment:6 Changed 7 weeks ago by jmroot (Joshua Root)

Milestone: MacPorts Future

comment:7 Changed 7 weeks ago by jmroot (Joshua Root)

Milestone: MacPorts FutureMacPorts 2.10.2
Note: See TracTickets for help on using tickets.