Recipe#auto_split -> Recipe#auto_splits
That particular method has no side-effect anymore, and is called internally automatically by #package and #build (through #do_splits).
This commit is contained in:
parent
132b3751ce
commit
f921798fd9
@ -27,8 +27,6 @@ recipes << Recipe.new(context, "hello", "2.10").tap do |recipe|
|
||||
recipe.description = "The GNU Hello program produces a familiar, friendly greeting."
|
||||
recipe.dependencies << "gettext"
|
||||
|
||||
recipe.auto_split
|
||||
|
||||
# Should be automatic now.
|
||||
#recipe.packages << Package::Package.new(recipe).tap do |package|
|
||||
# package.name = "#{recipe.name}-man"
|
||||
|
@ -132,7 +132,7 @@ class Package::Recipe
|
||||
end
|
||||
|
||||
private def do_splits
|
||||
@packages.each do |package|
|
||||
(@packages + auto_splits).each do |package|
|
||||
next if package == @packages[0]
|
||||
|
||||
files = package.files
|
||||
@ -162,9 +162,9 @@ class Package::Recipe
|
||||
end
|
||||
end
|
||||
|
||||
def auto_split
|
||||
@context.splitter_backends.each do |backend|
|
||||
@packages << backend.create_split self
|
||||
def auto_splits : Array(Package)
|
||||
@context.splitter_backends.compact_map do |backend|
|
||||
backend.create_split self
|
||||
end
|
||||
end
|
||||
|
||||
@ -174,7 +174,7 @@ class Package::Recipe
|
||||
def package : Bool
|
||||
# This tries to build them all and stops at the first failure
|
||||
# (failures are currently reported by Context#package)
|
||||
@packages
|
||||
(@packages + auto_splits)
|
||||
.find do |package|
|
||||
if package.automatic && ! File.exists? package.fake_root_directory
|
||||
next
|
||||
|
Reference in New Issue
Block a user