[MacPorts] #47442: port: new action_environment and/or environment mode

MacPorts noreply at macports.org
Sat May 9 13:20:41 PDT 2015


#47442: port: new action_environment and/or environment mode
--------------------------+--------------------------------
  Reporter:  pixilla@…    |      Owner:  macports-tickets@…
      Type:  enhancement  |     Status:  new
  Priority:  Normal       |  Milestone:
 Component:  base         |    Version:  2.3.3
Resolution:               |   Keywords:
      Port:               |
--------------------------+--------------------------------

Comment (by rjvbertin@…):

 Interesting, but is "env" (environment) the best choice of terms here? I
 would expect `port env` to print out the environment variables as they are
 set for and seen by commands launched through the port command, optionally
 for the given port(s).
 One could add something like the following to `macports::environment`:

 {{{
     set shenv {}
     foreach keyval [exec /usr/bin/printenv] {
         lappend shenv $keyval
     }
     if {![macports::ui_isset ports_quiet]} {
         lappend mpenv "$macports::ui_prefix shell environment: [join
 $shenv { }]"
     } else {
         lappend mpenv "shell environment [join $shenv { }]"
     }
 }}}

 (and of course let the command accept port names so that variables set by
 the Portfile(s) show up in printenv).

-- 
Ticket URL: <https://trac.macports.org/ticket/47442#comment:2>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list