Opened 11 years ago

#39272 new defect

`-p` flag for `port` command doesn't play nice with errors resulting from mismatched requested variants vs. originally-selected variants

Reported by: cooljeanius (Eric Gallager) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version: 2.1.3
Keywords: Cc:
Port:

Description

Often times I'll be installing a bunch of ports, and then MacPorts will try to install a port as a dependency with different variants than I had originally selected, for example:

--->  Dependencies to be installed: git-core curl gtk2 atk gobject-introspection gdk-pixbuf2 jasper shared-mime-info xorg-libXdamage libgee librsvg libart_lgpl libcroco libgsf poppler openjpeg15 poppler-data
DEBUG: Starting logging for curl
DEBUG: changing euid/egid - current euid: 0 - current egid: 0
DEBUG: egid changed to: 501
DEBUG: euid changed to: 502
Error: Requested variants "+ssl+universal" do not match original selection "+ares+metalink+sftp_scp+ssl+universal".
Please use the same variants again, perform 'port clean curl' or specify the force option (-f).
Error: Failed to install curl
DEBUG: Registry error: poppler-data not registered as installed & active.
    invoked from within
"registry_active ${subport}"
    invoked from within
"$workername eval registry_active \${subport}"
Please see the log file for port curl for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_net_curl/curl/main.log
Error: The following dependencies were not installed: git-core curl gtk2 atk gobject-introspection gdk-pixbuf2 jasper shared-mime-info xorg-libXdamage libgee librsvg libart_lgpl libcroco libgsf poppler openjpeg15 poppler-data

After that, MacPorts will continue to try to install ports, because I had the -p flag selected, but they all fail with the following message:

DEBUG: could not set effective gid to 501
    while executing
"setegid $egid"
    (procedure "chownAsRoot" line 7)
    invoked from within
"chownAsRoot $subbuildpath"
    (procedure "open_statefile" line 29)
    invoked from within
"open_statefile"
    (procedure "check_variants" line 29)
    invoked from within
"check_variants activate"
    invoked from within
"$workername eval check_variants $target"
    (procedure "mportexec" line 7)
    invoked from within
"mportexec $workername $target"
Error: Unable to execute port: could not set effective gid to 501

This behavior is not consistent with the behavior described in the manpage for port(1) for its -p flag:

-p       Despite any errors encountered, proceed to process multiple ports and commands.

Change History (0)

Note: See TracTickets for help on using tickets.