<pre style='margin:0'>
Rainer Müller (raimue) pushed a commit to branch master
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/08a845ff322d4f1ab55d2fcf53ecb5970d63db57">https://github.com/macports/macports-base/commit/08a845ff322d4f1ab55d2fcf53ecb5970d63db57</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 08a845ff322d4f1ab55d2fcf53ecb5970d63db57
</span>Author: Rainer Müller <raimue@macports.org>
AuthorDate: Sat Nov 5 03:17:09 2016 +0100
<span style='display:block; white-space:pre;color:#404040;'> UpdateVCS: return directory from GetUpdateVCSCmd
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> The VCS update command will be run in the given directory.
</span>---
src/macports1.0/macports.tcl | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/macports1.0/macports.tcl b/src/macports1.0/macports.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 1e06c4d..ab889ee 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/macports1.0/macports.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/macports1.0/macports.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2415,7 +2415,7 @@ proc macports::GetVCSUpdateCmd portDir {
</span> ([file exists .svn] ||
![catch {exec $svn info >/dev/null 2>@1}])
} then {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- return [list Subversion "$svn update --non-interactive $portDir"]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return [list Subversion "$svn update --non-interactive" $portDir]
</span> }
# Git
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2424,14 +2424,14 @@ proc macports::GetVCSUpdateCmd portDir {
</span> } then {
if {![catch {exec $git config --local --get svn-remote.svn.url}]} {
# git-svn repository
<span style='display:block; white-space:pre;background:#ffe0e0;'>- return [list git-svn "cd $portDir && $git svn rebase || true"]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return [list git-svn "$git svn rebase || true" $portDir]
</span> }
# regular git repository
set autostash ""
if {![catch {exec $git --version} gitversion] && [vercmp [lindex [split $gitversion] end] 1.8.4] >= 0} {
set autostash " --autostash"
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- return [list Git "cd $portDir && $git pull --rebase${autostash} || true"]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return [list Git "$git pull --rebase${autostash} || true" $portDir]
</span> }
# Add new VCSes here!
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2448,15 +2448,15 @@ proc macports::GetVCSUpdateCmd portDir {
</span> #
# This proc could probably be generalized and used elsewhere.
#
<span style='display:block; white-space:pre;background:#ffe0e0;'>-proc macports::UpdateVCS {cmd portDir} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+proc macports::UpdateVCS {cmd dir} {
</span> global env
if {[getuid] == 0} {
# Must change egid before dropping root euid.
set oldEGID [getegid]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set newEGID [name_to_gid [file attributes $portDir -group]]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set newEGID [name_to_gid [file attributes $dir -group]]
</span> setegid $newEGID
set oldEUID [geteuid]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set newEUID [name_to_uid [file attributes $portDir -owner]]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set newEUID [name_to_uid [file attributes $dir -owner]]
</span> seteuid $newEUID
set oldHOME $env(HOME)
set newHOME [getpwuid $newEUID dir]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2464,7 +2464,7 @@ proc macports::UpdateVCS {cmd portDir} {
</span> ui_debug "euid/egid changed to: $newEUID/$newEGID, HOME changed to: $newHOME"
}
ui_debug $cmd
<span style='display:block; white-space:pre;background:#ffe0e0;'>- catch {system $cmd} result options
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ catch {system -W $dir $cmd} result options
</span> if {[getuid] == 0} {
seteuid $oldEUID
setegid $oldEGID
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2512,9 +2512,9 @@ proc mportsync {{optionslist {}}} {
</span> continue
}
if {[llength $repoInfo]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- lassign $repoInfo vcs cmd
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lassign $repoInfo vcs cmd dir
</span> try -pass_signal {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- macports::UpdateVCS $cmd $portdir
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::UpdateVCS $cmd $dir
</span> } catch {*} {
ui_debug $::errorInfo
ui_info "Syncing local $vcs ports tree failed"
</pre><pre style='margin:0'>
</pre>