mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
dependency: consider bounds when comparing macOS deps
This commit is contained in:
parent
1d136be229
commit
df38dcc3d1
@ -231,6 +231,14 @@ class UsesFromMacOSDependency < Dependency
|
|||||||
@bounds = bounds
|
@bounds = bounds
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def ==(other)
|
||||||
|
instance_of?(other.class) && name == other.name && tags == other.tags && bounds == other.bounds
|
||||||
|
end
|
||||||
|
|
||||||
|
def hash
|
||||||
|
[name, tags, bounds].hash
|
||||||
|
end
|
||||||
|
|
||||||
def installed?
|
def installed?
|
||||||
use_macos_install? || super
|
use_macos_install? || super
|
||||||
end
|
end
|
||||||
|
@ -65,8 +65,6 @@ class DependencyCollector
|
|||||||
def cache_key(spec)
|
def cache_key(spec)
|
||||||
if spec.is_a?(Resource) && spec.download_strategy <= CurlDownloadStrategy
|
if spec.is_a?(Resource) && spec.download_strategy <= CurlDownloadStrategy
|
||||||
File.extname(spec.url)
|
File.extname(spec.url)
|
||||||
elsif spec.is_a?(UsesFromMacOSDependency)
|
|
||||||
"#{spec.name}-#{spec.bounds}"
|
|
||||||
else
|
else
|
||||||
spec
|
spec
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user