[MacPorts] #43202: macports.tcl: doesn't reset user if svn fails
MacPorts
noreply at macports.org
Fri Apr 4 22:47:19 PDT 2014
#43202: macports.tcl: doesn't reset user if svn fails
----------------------+-----------------------------
Reporter: mojca@… | Owner: cal@…
Type: defect | Status: closed
Priority: Normal | Milestone: MacPorts Future
Component: base | Version: 2.2.99
Resolution: fixed | Keywords: haspatch
Port: |
----------------------+-----------------------------
Comment (by mojca@…):
Thank you. As already mentioned it would be nice to see it in 2.3.0, but
that's up to you or others to decide.
I forgot to say earlier (and maybe I could write a patch as well), but it
would probably be helpful to add a bit of extra `ui_debug` info. For
example the following:
{{{
set euid [geteuid]
set egid [getegid]
ui_debug "changing euid/egid - current euid: $euid - current egid: $egid"
setegid [name_to_gid [file attributes $portdir -group]]
seteuid [name_to_uid [file attributes $portdir -owner]]
}}}
would be more helpful if both initial and final UID and GID were reported
(ideally also with username, not just number?). And it would probably be
nice to cleary report the the change during reversal as well.
An alternative would be to change all reports like
{{{
ui_debug $svn_commandline
}}}
into something like
{{{
ui_debug "Running '$svn_commandline' as [geteuid]"
}}}
but that would basically mean modifying debug all commands. Maybe that's
too much.
What do you think of moving `ui_debug $svn_commandline` from before the
loop to just before it gets executed, so that UID change would be reported
before it is printed out?
--
Ticket URL: <https://trac.macports.org/ticket/43202#comment:4>
MacPorts <http://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list