[103518] trunk/base/src/port1.0/portutil.tcl
ryandesign at macports.org
ryandesign at macports.org
Wed Feb 27 23:57:17 PST 2013
Revision: 103518
https://trac.macports.org/changeset/103518
Author: ryandesign at macports.org
Date: 2013-02-27 23:57:17 -0800 (Wed, 27 Feb 2013)
Log Message:
-----------
portutil.tcl: make a .tmp directory in workpath and set TMPDIR to it (#37834)
Modified Paths:
--------------
trunk/base/src/port1.0/portutil.tcl
Modified: trunk/base/src/port1.0/portutil.tcl
===================================================================
--- trunk/base/src/port1.0/portutil.tcl 2013-02-28 06:43:08 UTC (rev 103517)
+++ trunk/base/src/port1.0/portutil.tcl 2013-02-28 07:57:17 UTC (rev 103518)
@@ -5,7 +5,7 @@
# Copyright (c) 2002-2003 Apple Inc.
# Copyright (c) 2004 Robert Shaw <rshaw at opendarwin.org>
# Copyright (c) 2006-2007 Markus W. Weissmann <mww at macports.org>
-# Copyright (c) 2004-2012 The MacPorts Project
+# Copyright (c) 2004-2013 The MacPorts Project
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -1318,6 +1318,7 @@
set procedure [ditem_key $ditem procedure]
set savedhome [file join $portdbpath home]
set env(HOME) "${workpath}/.home"
+ set env(TMPDIR) "${workpath}/.tmp"
if {[ditem_key $ditem state] != "no"} {
set target_state_fd [open_statefile]
@@ -1542,6 +1543,9 @@
}
set env(HOME) $savedhome
+ if {[info exists env(TMPDIR)]} {
+ unset env(TMPDIR)
+ }
return $result
}
@@ -1658,8 +1662,16 @@
}
if {![tbool ports_dryrun]} {
- if {![file isdirectory $workpath]} {
- file mkdir "${workpath}/.home"
+ set need_chown 0
+ if {![file isdirectory $workpath/.home]} {
+ file mkdir $workpath/.home
+ set need_chown 1
+ }
+ if {![file isdirectory $workpath/.tmp]} {
+ file mkdir $workpath/.tmp
+ set need_chown 1
+ }
+ if {$need_chown} {
chownAsRoot $subbuildpath
}
# Create a symlink to the workpath for port authors
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130227/79f1b40e/attachment.html>
More information about the macports-changes
mailing list