lib/ruboto/util/update.rb in ruboto-1.2.0 vs lib/ruboto/util/update.rb in ruboto-1.3.0
- old
+ new
@@ -461,11 +461,11 @@
FileUtils.move "../#{jruby_core}", '.'
`jar -xf #{jruby_core}`
raise "Unpacking jruby-core jar failed: #$?" unless $? == 0
File.delete jruby_core
gem_version = Gem::Version.new(jruby_core_version.to_s.tr('-', '.'))
- if gem_version >= Gem::Version.new('9000.dev')
+ if gem_version >= Gem::Version.new('9.0.0.0.SNAPSHOT')
#noinspection RubyLiteralArrayInspection
excluded_core_packages = [
# FIXME(uwe): Exclude these packages?
# '**/*Darwin*',
@@ -505,11 +505,10 @@
'jnr/posix/OpenBSD*',
'jnr/x86asm',
'org/jruby/ant',
# 'org/jruby/compiler', # Needed for initialization, but should not be necessary
# 'org/jruby/compiler/impl', # Needed for initialization, but should not be necessary
- 'org/jruby/compiler/util',
'org/jruby/demo',
'org/jruby/embed/bsf',
'org/jruby/embed/jsr223',
'org/jruby/embed/osgi',
'org/jruby/ext/ffi/Enums*',
@@ -517,34 +516,83 @@
'org/jruby/javasupport/bsf',
# 'org/jruby/management', # should be excluded
# 'org/jruby/runtime/invokedynamic', # Should be excluded
# 'org/jruby/runtime/opto', # What is this?
# 'org/jruby/runtime/opto/OptoFactory*', # What is this?
-
- # FIXME(uwe): We should filter the whole truffle package...
- # 'org/jruby/truffle',
-
+ 'org/jruby/truffle',
'org/jruby/truffle/*.class',
'org/jruby/truffle/nodes',
'org/jruby/truffle/runtime/control',
'org/jruby/truffle/runtime/core',
- 'org/jruby/truffle/runtime/lookup',
'org/jruby/truffle/runtime/methods',
- 'org/jruby/truffle/runtime/objectstorage',
'org/jruby/truffle/runtime/signal',
'org/jruby/truffle/runtime/subsystems',
'org/jruby/truffle/runtime/util',
'org/jruby/truffle/runtime/*.class',
'org/jruby/truffle/translator',
- # EMXIF
-
+ ]
+ elsif gem_version >= Gem::Version.new('1.7.20.dev')
+ # TODO(uwe): Remove when we stop supporting jruby-jars 1.7.20
+ excluded_core_packages = [
+ '**/*.sh',
+ '**/*Aix*',
+ '**/*Darwin*',
+ '**/*darwin*',
+ '**/*FreeBSD*',
+ '**/*freebsd*',
+ '**/*MacOS*',
+ '**/*OpenBSD*',
+ '**/*openbsd*',
+ '**/*Solaris*',
+ '**/*sunos*',
+ '**/*Windows*',
+ '**/*windows*',
+ 'META-INF',
+ 'com/headius/invokebinder',
+ 'com/headius/options/example',
+ 'com/kenai/constantine',
+ 'com/kenai/jffi',
+ 'com/kenai/jnr/x86asm',
+ 'com/martiansoftware',
+ 'jni',
+ 'jnr/constants/platform/fake',
+ 'jnr/enxio',
+ 'jnr/ffi/annotations',
+ 'jnr/ffi/byref',
+ 'jnr/ffi/mapper',
+ 'jnr/ffi/provider',
+ 'jnr/ffi/util',
+ 'jnr/ffi/Struct$*',
+ 'jnr/ffi/types',
+ 'jnr/x86asm',
+ 'org/jruby/ant',
+ 'org/jruby/cext',
+ 'org/jruby/compiler/impl/BaseBodyCompiler*',
+ 'org/jruby/compiler/util',
+ 'org/jruby/demo',
+ 'org/jruby/embed/bsf',
+ 'org/jruby/embed/jsr223',
+ 'org/jruby/embed/osgi',
+ 'org/jruby/ext/ffi/AbstractMemory*',
+ 'org/jruby/ext/ffi/Enums*',
+ 'org/jruby/ext/ffi/io',
+ 'org/jruby/ext/ffi/jffi',
+ 'org/jruby/javasupport/bsf',
'org/yecht',
- 'yaml.rb', # This looks like 1.8 stdlib...
+ 'yaml.rb',
]
- elsif gem_version >= Gem::Version.new('1.7.17.dev')
+ elsif gem_version >= Gem::Version.new('1.7.19')
+ # TODO(uwe): Remove when we stop supporting jruby-jars 1.7.19
+ excluded_core_packages = %w(**/*.sh **/*Darwin* **/*Solaris* **/*windows* **/*Windows* META-INF com/headius/invokebinder com/headius/options/example com/kenai/constantine com/kenai/jffi com/kenai/jnr/x86asm com/martiansoftware jni jnr/constants/platform/darwin jnr/constants/platform/fake jnr/constants/platform/freebsd jnr/constants/platform/openbsd jnr/constants/platform/sunos jnr/enxio jnr/ffi/annotations jnr/ffi/byref jnr/ffi/mapper jnr/ffi/provider jnr/ffi/util jnr/ffi/Struct$* jnr/ffi/types jnr/posix/Aix* jnr/posix/FreeBSD* jnr/posix/MacOS* jnr/posix/OpenBSD* jnr/x86asm org/jruby/ant org/jruby/cext org/jruby/compiler/impl/BaseBodyCompiler* org/jruby/compiler/util org/jruby/demo org/jruby/embed/bsf org/jruby/embed/jsr223 org/jruby/embed/osgi org/jruby/ext/ffi/AbstractMemory* org/jruby/ext/ffi/Enums* org/jruby/ext/ffi/io org/jruby/ext/ffi/jffi org/jruby/javasupport/bsf org/yecht yaml.rb)
+ elsif gem_version >= Gem::Version.new('1.7.18')
+ # TODO(uwe): Remove when we stop supporting jruby-jars 1.7.18
+ excluded_core_packages = %w(**/*Darwin* **/*Solaris* **/*windows* **/*Windows* META-INF com/headius/invokebinder com/headius/options/example com/kenai/constantine com/kenai/jffi com/kenai/jnr/x86asm com/martiansoftware jni jnr/constants/platform/darwin jnr/constants/platform/fake jnr/constants/platform/freebsd jnr/constants/platform/openbsd jnr/constants/platform/sunos jnr/enxio jnr/ffi/annotations jnr/ffi/byref jnr/ffi/mapper jnr/ffi/provider jnr/ffi/util jnr/ffi/Struct$* jnr/ffi/types jnr/posix/Aix* jnr/posix/FreeBSD* jnr/posix/MacOS* jnr/posix/OpenBSD* jnr/x86asm org/jruby/ant org/jruby/cext org/jruby/compiler/impl/BaseBodyCompiler* org/jruby/compiler/util org/jruby/demo org/jruby/embed/bsf org/jruby/embed/jsr223 org/jruby/embed/osgi org/jruby/ext/ffi/AbstractMemory* org/jruby/ext/ffi/Enums* org/jruby/ext/ffi/io org/jruby/ext/ffi/jffi org/jruby/javasupport/bsf org/yecht yaml.rb)
+ elsif gem_version >= Gem::Version.new('1.7.17')
+ # TODO(uwe): Remove when we stop supporting jruby-jars 1.7.17
excluded_core_packages = %w(*.sh **/*Darwin* **/*Solaris* **/*windows* **/*Windows* META-INF com/headius/invokebinder com/headius/options/example com/kenai/constantine com/kenai/jffi com/kenai/jnr/x86asm com/martiansoftware jni jnr/constants/platform/darwin jnr/constants/platform/fake jnr/constants/platform/freebsd jnr/constants/platform/openbsd jnr/constants/platform/sunos jnr/enxio jnr/ffi/annotations jnr/ffi/byref jnr/ffi/mapper jnr/ffi/provider jnr/ffi/util jnr/ffi/Struct$* jnr/ffi/types jnr/posix/Aix* jnr/posix/FreeBSD* jnr/posix/MacOS* jnr/posix/OpenBSD* jnr/x86asm org/jruby/ant org/jruby/cext org/jruby/compiler/impl/BaseBodyCompiler* org/jruby/compiler/util org/jruby/demo org/jruby/embed/bsf org/jruby/embed/jsr223 org/jruby/embed/osgi org/jruby/ext/ffi/AbstractMemory* org/jruby/ext/ffi/Enums* org/jruby/ext/ffi/io org/jruby/ext/ffi/jffi org/jruby/javasupport/bsf org/yecht yaml.rb)
elsif gem_version >= Gem::Version.new('1.7.12')
+ # TODO(uwe): Remove when we stop supporting jruby-jars 1.7.12
excluded_core_packages = %w(**/*Darwin* **/*Solaris* **/*windows* **/*Windows* META-INF com/headius/invokebinder com/headius/options/example com/kenai/constantine com/kenai/jffi com/kenai/jnr/x86asm com/martiansoftware jni jnr/constants/platform/darwin jnr/constants/platform/fake jnr/constants/platform/freebsd jnr/constants/platform/openbsd jnr/constants/platform/sunos jnr/enxio jnr/ffi/annotations jnr/ffi/byref jnr/ffi/mapper jnr/ffi/provider jnr/ffi/util jnr/ffi/Struct$* jnr/ffi/types jnr/posix/Aix* jnr/posix/FreeBSD* jnr/posix/MacOS* jnr/posix/OpenBSD* jnr/x86asm org/jruby/ant org/jruby/cext org/jruby/compiler/impl/BaseBodyCompiler* org/jruby/compiler/util org/jruby/demo org/jruby/embed/bsf org/jruby/embed/jsr223 org/jruby/embed/osgi org/jruby/ext/ffi/AbstractMemory* org/jruby/ext/ffi/Enums* org/jruby/ext/ffi/io org/jruby/ext/ffi/jffi org/jruby/javasupport/bsf org/yecht yaml.rb)
elsif gem_version >= Gem::Version.new('1.7.5')
# TODO(uwe): Remove when we stop supporting jruby-jars 1.7.5
excluded_core_packages = %w(**/*Darwin* **/*Solaris* **/*windows* **/*Windows* META-INF com/headius com/kenai/constantine com/kenai/jffi com/kenai/jnr/x86asm com/martiansoftware jni jnr/constants/platform/darwin jnr/constants/platform/fake jnr/constants/platform/freebsd jnr/constants/platform/openbsd jnr/constants/platform/sunos jnr/ffi/annotations jnr/ffi/byref jnr/ffi/mapper jnr/ffi/provider jnr/ffi/util jnr/ffi/Struct$* jnr/ffi/types jnr/posix/Aix* jnr/posix/FreeBSD* jnr/posix/MacOS* jnr/posix/OpenBSD* jnr/x86asm org/jruby/ant org/jruby/cext org/jruby/compiler/impl/BaseBodyCompiler* org/jruby/compiler/util org/jruby/demo org/jruby/embed/bsf org/jruby/embed/jsr223 org/jruby/embed/osgi org/jruby/ext/ffi/AbstractMemory* org/jruby/ext/ffi/io org/jruby/ext/ffi/jffi org/jruby/ext/tracepoint org/jruby/javasupport/bsf org/yecht)
elsif gem_version >= Gem::Version.new('1.7.4')
@@ -568,10 +616,10 @@
end
excluded_core_packages.each do |i|
if File.directory? i
FileUtils.remove_dir(i, true) rescue puts "Failed to remove package: #{i} (#{$!})"
- elsif Dir[i].each { |f| FileUtils.rm_rf f }.empty?
+ elsif Dir.glob(i, File::FNM_CASEFOLD).each { |f| FileUtils.rm_rf f }.empty?
print "exclude pattern #{i.inspect} found no files..."
end
end
# FIXME(uwe): Add a Ruboto.yml config for this if it works