summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2014-09-11 13:24:50 +0100
committerSam Thursfield <sam.thursfield@codethink.co.uk>2014-09-11 13:37:04 +0100
commitb1d014683df84815f70abba38643b2d7faf3f6f3 (patch)
tree1cfecf208acd74fd33637c3d7f7a92af788afa88
parentec7257ff2c91adcd67ea38b8ca2c29965cbb8241 (diff)
downloadmorph-b1d014683df84815f70abba38643b2d7faf3f6f3.tar.gz
import: Add split rules back to rubygems.to_chunk
It's too hard to build these into Morph's default rules for now.
-rwxr-xr-ximport/rubygems.to_chunk20
1 files changed, 19 insertions, 1 deletions
diff --git a/import/rubygems.to_chunk b/import/rubygems.to_chunk
index 0bcc8c88..5c11969d 100755
--- a/import/rubygems.to_chunk
+++ b/import/rubygems.to_chunk
@@ -145,7 +145,7 @@ class RubyGemChunkMorphologyGenerator
{
'artifact' => "#{spec.full_name}-doc",
'include' => [
- "usr/lib/ruby/gems/#{BASEROCK_RUBY_VERSION}/doc/.*"
+ "usr/lib/ruby/gems/\d[\w.]*/doc/.*"
]
}
]
@@ -172,6 +172,24 @@ class RubyGemChunkMorphologyGenerator
# installed. We must have the Gem metadata available, and `gem build; gem
# install` seems the easiest way to achieve that.
+ # There's more splitting to be done, but putting the docs in the
+ # correct artifact is the single biggest win for enabling smaller
+ # system images.
+ #
+ # Adding this to Morph's default ruleset is painful, because:
+ # - Changing the default split rules triggers a rebuild of everything.
+ # - The whole split rule code needs reworking to prevent overlaps and to
+ # make it possible to extend rules without creating overlaps. It's
+ # otherwise impossible to reason about.
+ split_rules = [
+ {
+ 'artifact' => "#{spec.full_name}-doc",
+ 'include' => [
+ "usr/lib/ruby/gems/\d[\w.]*/doc/.*"
+ ]
+ }
+ ]
+
build_commands = [
"gem build #{spec.name}.gemspec",
]