mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
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.
This commit is contained in:
parent
02298920d0
commit
ab10ab42fa
@ -245,6 +245,10 @@ class Bottle
|
|||||||
@spec.compatible_cellar?
|
@spec.compatible_cellar?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def needs_relocation?
|
||||||
|
@spec.needs_relocation?
|
||||||
|
end
|
||||||
|
|
||||||
def stage
|
def stage
|
||||||
resource.downloader.stage
|
resource.downloader.stage
|
||||||
end
|
end
|
||||||
@ -270,6 +274,7 @@ class BottleSpecification
|
|||||||
@prefix = DEFAULT_PREFIX
|
@prefix = DEFAULT_PREFIX
|
||||||
@cellar = DEFAULT_CELLAR
|
@cellar = DEFAULT_CELLAR
|
||||||
@collector = BottleCollector.new
|
@collector = BottleCollector.new
|
||||||
|
@does_not_need_relocation = false
|
||||||
end
|
end
|
||||||
|
|
||||||
def root_url(var = nil)
|
def root_url(var = nil)
|
||||||
@ -284,6 +289,14 @@ class BottleSpecification
|
|||||||
cellar == :any || cellar == HOMEBREW_CELLAR.to_s
|
cellar == :any || cellar == HOMEBREW_CELLAR.to_s
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def does_not_need_relocation
|
||||||
|
@does_not_need_relocation = true
|
||||||
|
end
|
||||||
|
|
||||||
|
def needs_relocation?
|
||||||
|
!@does_not_need_relocation
|
||||||
|
end
|
||||||
|
|
||||||
def tag?(tag)
|
def tag?(tag)
|
||||||
!!checksum_for(tag)
|
!!checksum_for(tag)
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user