From 478f18a8f57705a0c16b27b257f022f91c0b630b Mon Sep 17 00:00:00 2001 From: Xu Cheng Date: Tue, 22 Mar 2016 15:19:33 +0800 Subject: software_spec: add ExternalPatch to dependency_collector Since we support `apply` DSL in the `patch` block, external patch files could be any compressed archive. As result, it could introduce dependencies like xz, 7z etc. Add the resource of ExternalPatch to dependency_collector, so we could track these resource dependencies. Closes Homebrew/homebrew#50318. Signed-off-by: Xu Cheng --- Library/Homebrew/software_spec.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Library') diff --git a/Library/Homebrew/software_spec.rb b/Library/Homebrew/software_spec.rb index 8f5f7c178..0720fab3d 100644 --- a/Library/Homebrew/software_spec.rb +++ b/Library/Homebrew/software_spec.rb @@ -165,7 +165,9 @@ class SoftwareSpec end def patch(strip = :p1, src = nil, &block) - patches << Patch.create(strip, src, &block) + p = Patch.create(strip, src, &block) + dependency_collector.add(p.resource) if p.is_a? ExternalPatch + patches << p end def fails_with(compiler, &block) -- cgit v1.2.3