[25142] trunk/base/src/darwinports1.0/darwinports.tcl
source_changes at macosforge.org
source_changes at macosforge.org
Mon May 14 14:49:44 PDT 2007
Revision: 25142
http://trac.macosforge.org/projects/macports/changeset/25142
Author: eridius at macports.org
Date: 2007-05-14 14:49:44 -0700 (Mon, 14 May 2007)
Log Message:
-----------
Adopt the uid/gid of the owner of the svn repo before updating during dportsync for file: sources
Modified Paths:
--------------
trunk/base/src/darwinports1.0/darwinports.tcl
Modified: trunk/base/src/darwinports1.0/darwinports.tcl
===================================================================
--- trunk/base/src/darwinports1.0/darwinports.tcl 2007-05-14 21:35:06 UTC (rev 25141)
+++ trunk/base/src/darwinports1.0/darwinports.tcl 2007-05-14 21:49:44 UTC (rev 25142)
@@ -1191,12 +1191,19 @@
if {[catch {set svncmd [darwinports::binaryInPath "svn"]}] == 0} {
set svn_commandline "${svncmd} update --non-interactive \"${portdir}\""
ui_debug $svn_commandline
- if {[catch {system $svn_commandline}]} {
+ if {[catch {
+ 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]]
+ system $svn_commandline
+ seteuid $euid
+ setegid $egid
+ }]} {
+ ui_debug "$::errorInfo"
return -code error "sync failed doing svn update"
}
- if {[catch {system "chmod -R a+r \"${portdir}\""}]} {
- ui_warn "Setting world read permissions on parts of the ports tree failed, need root?"
- }
} else {
return -code error "svn command not found"
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070514/6c31be07/attachment.html
More information about the macports-changes
mailing list