aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/software_spec.rb
diff options
context:
space:
mode:
authorWilliam Woodruff2015-05-25 23:32:55 -0400
committerMisty De Meo2015-08-21 10:56:23 -0700
commitab10ab42fa2f85f5b7abce733a02ea7a47e98683 (patch)
tree9c558453306e4c02c48bc143a6d0d605e359d505 /Library/Homebrew/software_spec.rb
parent02298920d03bd63ef79258d562bba805da6bfe8e (diff)
downloadbrew-ab10ab42fa2f85f5b7abce733a02ea7a47e98683.tar.bz2
BottleSpecification: add does_not_need_relocation field
Toggled with does_not_need_relocation method in bottle block. Also declare needs_relocation? accessors in software/bottle specs.
Diffstat (limited to 'Library/Homebrew/software_spec.rb')
-rw-r--r--Library/Homebrew/software_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/Library/Homebrew/software_spec.rb b/Library/Homebrew/software_spec.rb
index f7e2ff113..8f1e14c09 100644
--- a/Library/Homebrew/software_spec.rb
+++ b/Library/Homebrew/software_spec.rb
@@ -245,6 +245,10 @@ class Bottle
@spec.compatible_cellar?
end
+ def needs_relocation?
+ @spec.needs_relocation?
+ end
+
def stage
resource.downloader.stage
end
@@ -270,6 +274,7 @@ class BottleSpecification
@prefix = DEFAULT_PREFIX
@cellar = DEFAULT_CELLAR
@collector = BottleCollector.new
+ @does_not_need_relocation = false
end
def root_url(var = nil)
@@ -284,6 +289,14 @@ class BottleSpecification
cellar == :any || cellar == HOMEBREW_CELLAR.to_s
end
+ def does_not_need_relocation
+ @does_not_need_relocation = true
+ end
+
+ def needs_relocation?
+ !@does_not_need_relocation
+ end
+
def tag?(tag)
!!checksum_for(tag)
end