[39277] branches/gsoc08-privileges/base/src/port1.0/portutil.tcl
pmagrath at macports.org
pmagrath at macports.org
Fri Aug 15 04:55:59 PDT 2008
Revision: 39277
http://trac.macosforge.org/projects/macports/changeset/39277
Author: pmagrath at macports.org
Date: 2008-08-15 04:55:58 -0700 (Fri, 15 Aug 2008)
Log Message:
-----------
Simplify some string manipulations. Rewrite destroot args where necessary.
Modified Paths:
--------------
branches/gsoc08-privileges/base/src/port1.0/portutil.tcl
Modified: branches/gsoc08-privileges/base/src/port1.0/portutil.tcl
===================================================================
--- branches/gsoc08-privileges/base/src/port1.0/portutil.tcl 2008-08-15 07:53:29 UTC (rev 39276)
+++ branches/gsoc08-privileges/base/src/port1.0/portutil.tcl 2008-08-15 11:55:58 UTC (rev 39277)
@@ -1397,7 +1397,7 @@
proc open_statefile {args} {
global workpath worksymlink place_worksymlink portname portpath ports_ignore_older
global altprefix usealtworkpath env applications_dir portbuildpath distpath
- global portname
+ global portname destroot.args prefix
# start gsoc08-privileges
@@ -1439,13 +1439,17 @@
set altprefix "$userhome/.macports"
# get alternative paths
- set newworkpath "$altprefix/[ string range $workpath 1 end ]"
- set newworksymlink "$altprefix/[ string range $worksymlink 1 end ]"
- set newportbuildpath "$altprefix/[ string range $portbuildpath 1 end ]"
- set newdistpath "$altprefix/[ string range $distpath 1 end ]"
+ set newworkpath "$altprefix$workpath"
+ set newworksymlink "$altprefix$worksymlink"
+ set newportbuildpath "$altprefix$portbuildpath"
+ set newdistpath "$altprefix$distpath"
set sourcepath [string map {"work" ""} $worksymlink]
set newsourcepath "$altprefix/[ string range $sourcepath 1 end ]"
+
+ set argprefix "=${prefix}"
+ set newargprefix "=${altprefix}${prefix}"
+ set newdestrootargs [string map [list $argprefix $newargprefix] ${destroot.args}]
# copy Portfile (and patch files) if not there already
# note to maintainers/devs: the original portfile in /opt is ALWAYS the one that will be
@@ -1467,6 +1471,7 @@
set worksymlink $newworksymlink
set portbuildpath $newportbuildpath
set distpath $newdistpath
+ set destroot.args $newdestrootargs
ui_debug "Going to use $newworkpath for statefile."
} else {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080815/abdcc1b6/attachment.html
More information about the macports-changes
mailing list