Obsolete
/
packaging
Archived
3
0
Fork 0

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).
master
Luka Vandervelden 2019-07-20 13:52:24 +02:00
parent 132b3751ce
commit f921798fd9
2 changed files with 5 additions and 7 deletions

View File

@ -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.description = "The GNU Hello program produces a familiar, friendly greeting."
recipe.dependencies << "gettext" recipe.dependencies << "gettext"
recipe.auto_split
# Should be automatic now. # Should be automatic now.
#recipe.packages << Package::Package.new(recipe).tap do |package| #recipe.packages << Package::Package.new(recipe).tap do |package|
# package.name = "#{recipe.name}-man" # package.name = "#{recipe.name}-man"

View File

@ -132,7 +132,7 @@ class Package::Recipe
end end
private def do_splits private def do_splits
@packages.each do |package| (@packages + auto_splits).each do |package|
next if package == @packages[0] next if package == @packages[0]
files = package.files files = package.files
@ -162,9 +162,9 @@ class Package::Recipe
end end
end end
def auto_split def auto_splits : Array(Package)
@context.splitter_backends.each do |backend| @context.splitter_backends.compact_map do |backend|
@packages << backend.create_split self backend.create_split self
end end
end end
@ -174,7 +174,7 @@ class Package::Recipe
def package : Bool def package : Bool
# This tries to build them all and stops at the first failure # This tries to build them all and stops at the first failure
# (failures are currently reported by Context#package) # (failures are currently reported by Context#package)
@packages (@packages + auto_splits)
.find do |package| .find do |package|
if package.automatic && ! File.exists? package.fake_root_directory if package.automatic && ! File.exists? package.fake_root_directory
next next