mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Default to patch level 1
Having gone through our patches it's clear that p1 is more standard. Also fixed a bug where returning DATA outside of an array would fail to patch.
This commit is contained in:
parent
aafbdcc115
commit
c71d4ad2bc
@ -116,7 +116,7 @@ class Formula
|
|||||||
# }
|
# }
|
||||||
# The final option is to return DATA, then put a diff after __END__ and you
|
# The final option is to return DATA, then put a diff after __END__ and you
|
||||||
# can still return a Hash with DATA as the value for a patch level key.
|
# can still return a Hash with DATA as the value for a patch level key.
|
||||||
def patches; [] end
|
def patches; end
|
||||||
# reimplement and specify dependencies
|
# reimplement and specify dependencies
|
||||||
def deps; end
|
def deps; end
|
||||||
# sometimes the clean process breaks things, return true to skip anything
|
# sometimes the clean process breaks things, return true to skip anything
|
||||||
@ -254,12 +254,12 @@ private
|
|||||||
end
|
end
|
||||||
|
|
||||||
def patch
|
def patch
|
||||||
return if patches.empty?
|
return if patches.nil?
|
||||||
|
|
||||||
ohai "Patching"
|
ohai "Patching"
|
||||||
if not patches.kind_of? Hash
|
if not patches.kind_of? Hash
|
||||||
# We assume -p0
|
# We assume -p0
|
||||||
patch_defns = { :p0 => patches }
|
patch_defns = { :p1 => patches }
|
||||||
else
|
else
|
||||||
patch_defns = patches
|
patch_defns = patches
|
||||||
end
|
end
|
||||||
@ -267,6 +267,9 @@ private
|
|||||||
patch_list=[]
|
patch_list=[]
|
||||||
n=0
|
n=0
|
||||||
patch_defns.each do |arg, urls|
|
patch_defns.each do |arg, urls|
|
||||||
|
# DATA.each does each line, which doesn't work so great
|
||||||
|
urls = [urls] unless urls.kind_of? Array
|
||||||
|
|
||||||
urls.each do |url|
|
urls.each do |url|
|
||||||
p = {:filename => '%03d-homebrew.diff' % n+=1, :compression => false}
|
p = {:filename => '%03d-homebrew.diff' % n+=1, :compression => false}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user