aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/software_spec.rb
diff options
context:
space:
mode:
authorWilliam Woodruff2015-07-26 16:49:16 -0400
committerMisty De Meo2015-08-21 11:02:33 -0700
commit1face808f5f1dc43c887cab421b5c01f7e20fdf7 (patch)
tree0d1308a216ba4b316470c84d3e02e7b09e752803 /Library/Homebrew/software_spec.rb
parentf58506ea6f7000e7e6d3f6538dc5ff2c43ea7926 (diff)
downloadbrew-1face808f5f1dc43c887cab421b5c01f7e20fdf7.tar.bz2
Add guards to calls that would trigger Xcode install requests
add guard in Formula#file_modified? to prevent git popup add guard in Superenv.bin before calling MacOS::Xcode.version add guard against missing Xcode/CLT in Xcode.uncached_version return nil instread of 0 in uncached_version when Xcode/CLT are not present, to distinguish from linuxbrew behavior checks against pour_bottle? and needs_relocation?, add guard around keg.relocate_install_names to check pour_bottle?/needs_relocation? as well needs_relocation? becomes skip_relocation?, use cellar attr to indicate relocation instead of does_not_need_relocation MacOS.can_build? becomes MacOS.has_apple_developer_tools?
Diffstat (limited to 'Library/Homebrew/software_spec.rb')
-rw-r--r--Library/Homebrew/software_spec.rb15
1 files changed, 5 insertions, 10 deletions
diff --git a/Library/Homebrew/software_spec.rb b/Library/Homebrew/software_spec.rb
index 8f1e14c09..edc5f7645 100644
--- a/Library/Homebrew/software_spec.rb
+++ b/Library/Homebrew/software_spec.rb
@@ -245,8 +245,8 @@ class Bottle
@spec.compatible_cellar?
end
- def needs_relocation?
- @spec.needs_relocation?
+ def skip_relocation?
+ @spec.skip_relocation?
end
def stage
@@ -274,7 +274,6 @@ class BottleSpecification
@prefix = DEFAULT_PREFIX
@cellar = DEFAULT_CELLAR
@collector = BottleCollector.new
- @does_not_need_relocation = false
end
def root_url(var = nil)
@@ -286,15 +285,11 @@ class BottleSpecification
end
def compatible_cellar?
- cellar == :any || cellar == HOMEBREW_CELLAR.to_s
+ cellar == :any || cellar == :any_skip_relocation || cellar == HOMEBREW_CELLAR.to_s
end
- def does_not_need_relocation
- @does_not_need_relocation = true
- end
-
- def needs_relocation?
- !@does_not_need_relocation
+ def skip_relocation?
+ cellar == :any_skip_relocation
end
def tag?(tag)