aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorAdam Vandenberg2010-05-01 14:06:23 -0700
committerAdam Vandenberg2010-07-03 21:48:37 -0700
commitc37294e9d322d4e19fce38cb782d1f7e7a574362 (patch)
tree5eaae00e7a938f1c1a34e5dee8993ccfec8ee64c /Library/Homebrew
parentecb5ce103e8436bbafc4ea646bda8ea4446ffee4 (diff)
downloadbrew-c37294e9d322d4e19fce38cb782d1f7e7a574362.tar.bz2
Allow user to override temp folder with HOMEBREW_TEMP
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/brew_doctor.rb10
-rw-r--r--Library/Homebrew/formula.rb7
2 files changed, 9 insertions, 8 deletions
diff --git a/Library/Homebrew/brew_doctor.rb b/Library/Homebrew/brew_doctor.rb
index e6202798c..c4daa06c4 100644
--- a/Library/Homebrew/brew_doctor.rb
+++ b/Library/Homebrew/brew_doctor.rb
@@ -353,17 +353,13 @@ def check_for_multiple_volumes
unless where_cellar == where_temp
puts <<-EOS.undent
- Your Cellar and TMP folders are on different volumes.
+ Your Cellar and /tmp folders are on different volumes.
Putting your Cellar and TMP folders on different volumes causes problems
for brews that install symlinks, such as Git.
- Please post the details of your setup to this existing issue, if the comments
- there don't already capture them:
- http://github.com/mxcl/homebrew/issues/issue/1238
-
- A work-around is available in this branch:
- http://github.com/adamv/homebrew/tree/temp
+ You should set the "HOMEBREW_TEMP" environmental variable to a suitable
+ folder on the same volume as your Cellar.
EOS
end
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 7f8b5ebc5..325ec8408 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -347,7 +347,12 @@ private
# I used /tmp rather than mktemp -td because that generates a directory
# name with exotic characters like + in it, and these break badly written
# scripts that don't escape strings before trying to regexp them :(
- tmp=Pathname.new `/usr/bin/mktemp -d /tmp/homebrew-#{name}-#{version}-XXXX`.strip
+
+ # If the user has FileVault enabled, then we can't mv symlinks from the
+ # /tmp volume to the other volume. So we let the user override the tmp
+ # prefix if they need to.
+ tmp_prefix = ENV['HOMEBREW_TEMP'] || '/tmp'
+ tmp=Pathname.new `/usr/bin/mktemp -d #{tmp_prefix}/homebrew-#{name}-#{version}-XXXX`.strip
raise "Couldn't create build sandbox" if not tmp.directory? or $? != 0
begin
wd=Dir.pwd