bin/autoproj_bootstrap in autoproj-1.9.3.rc2 vs bin/autoproj_bootstrap in autoproj-1.9.3.rc3
- old
+ new
@@ -519,13 +519,24 @@
end
if !installed.empty? && Autobuild.do_update
# Look if we can update the package ...
dep = Gem::Dependency.new(name, version_requirements)
- available = gem_fetcher.find_matching(dep, true, true, GemManager.with_prerelease)
+ available =
+ if gem_fetcher.respond_to?(:find_matching)
+ gem_fetcher.find_matching(dep).map(&:first)
+ else # Post RubyGems-2.0
+ type = if GemManager.with_prerelease then :prerelease
+ else :complete
+ end
+
+ gem_fetcher.detect(type) do |tuple|
+ tuple.name == name && dep.match?(tuple)
+ end.map { |tuple, _| [tuple.name, tuple.version] }
+ end
installed_version = installed.map(&:version).max
- available_version = available.map { |(name, v), source| v }.max
+ available_version = available.map { |name, v| v }.max
if !available_version
if version
raise ConfigError.new, "cannot find any gem with the name '#{name}' and version #{version}"
else
raise ConfigError.new, "cannot find any gem with the name '#{name}'"
@@ -640,13 +651,11 @@
def self.alias(old_name, new_name)
@aliases[new_name] = old_name
end
def self.ruby_version_keyword
- if RUBY_VERSION < "1.9.0" then "ruby18"
- else "ruby19"
- end
+ "ruby#{RUBY_VERSION.split('.')[0, 2].join("")}"
end
def self.autodetect_ruby
self.alias(ruby_version_keyword, "ruby")
end
@@ -959,10 +968,12 @@
while OSDependencies.aliases.has_key?(name)
name = OSDependencies.aliases[name]
end
os_names, os_versions = OSDependencies.operating_system
+ os_names = os_names.dup
+ os_names << 'default'
dep_def = definitions[name]
if !dep_def
return nil
end
@@ -1970,9 +1981,10 @@
- rubygems
darwin:
- ruby19
- rake
default: nonexistent
+ruby20: ignore
build-essential:
debian,ubuntu: build-essential
gentoo: ignore
arch: ignore
fedora: ignore