bin/autoproj_bootstrap in autoproj-1.8.2.b6 vs bin/autoproj_bootstrap in autoproj-1.8.2.b7

- old
+ new

@@ -740,11 +740,11 @@ if options[:force] @operating_system = nil else if !@operating_system.nil? return @operating_system - elsif Autoproj.has_config_key?('operating_system') && !(user_os = ENV['AUTOPROJ_OS']) + elsif Autoproj.has_config_key?('operating_system') os = Autoproj.user_config('operating_system') if os.respond_to?(:to_ary) if os[0].respond_to?(:to_ary) && os[0].all? { |s| s.respond_to?(:to_str) } && os[1].respond_to?(:to_ary) && os[1].all? { |s| s.respond_to?(:to_str) } @operating_system = os @@ -949,11 +949,11 @@ def partition_osdep_entry(osdep_name, dep_def, handler_names, excluded, *keys) keys, *additional_keys = *keys found = false nonexistent = false result = [] - found_keys = Hash.new + found_keys = [] Array(dep_def).each do |names, values| if !values # Raw array of packages. Possible only if we are not at toplevel # (i.e. if we already have a handler) if names == 'ignore' @@ -995,29 +995,21 @@ end matching_name = keys.find { |k| names.any? { |name_tag| k == name_tag.downcase } } if matching_name rec_found, rec_result = partition_osdep_entry(osdep_name, values, handler_names, excluded, *additional_keys) - # We only consider the first highest-priority entry, - # regardless of whether it has some packages for us or - # not - idx = keys.index(matching_name) - if !rec_found - if !found_keys.has_key?(idx) - found_keys[idx] = nil - end - else + + if rec_found + idx = keys.index(matching_name) found_keys[idx] ||= [0, []] found_keys[idx][0] += rec_found found_keys[idx][1].concat(rec_result) end end end end - first_entry = found_keys.keys.sort.first - found_keys = found_keys[first_entry] - if found_keys + if found_keys = found_keys.compact.first if found_keys[0] > 0 nonexistent = true else found = true end @@ -1647,11 +1639,10 @@ # Use this in autoproj/init.rb to make sure that the environment will not # get polluted during the build. def self.set_initial_env Autoproj.env_set 'RUBYOPT', "-rubygems" Autoproj.env_set 'GEM_HOME', Autoproj.gem_home - Autoproj.env_add_path 'GEM_PATH', Autoproj.gem_home Autoproj.env_set_path 'PATH', "#{Autoproj.gem_home}/bin", "/usr/local/bin", "/usr/bin", "/bin" Autoproj.env_set 'PKG_CONFIG_PATH' Autoproj.env_set 'RUBYLIB' Autoproj.env_set 'LD_LIBRARY_PATH' end @@ -1677,11 +1668,11 @@ shell_file = File.join(shell_dir, "autoproj_#{shell_kind}") if File.exists?(shell_file) Autoproj.message Autoproj.message "autodetected the shell to be #{shell_kind}, sourcing autoproj shell helpers" Autoproj.message "add \"Autoproj.shell_helpers = false\" in autoproj/init.rb to disable" - Autobuild.env_source_after(shell_file) + Autobuild.env_source_file(shell_file) end end end File.open(filename, "w") do |io| @@ -1742,89 +1733,96 @@ end @root_dir = Dir.pwd end DEFS = <<EODEFS ---- -git: - debian: - default: git-core - lenny: git - arch: git - gentoo: dev-vcs/git - ubuntu: git-core -autotools: - debian,ubuntu: - - automake1.9 - - autoconf - arch: automake autoconf - gentoo: - - sys-devel/automake:1.9 - - sys-devel/autoconf +--- none: ignore -cvs: - debian,ubuntu: cvs -cmake: - debian,ubuntu: cmake - arch: cmake - gentoo: dev-util/cmake -lsb_release: - debian,ubuntu: lsb-release - arch: ignore - gentoo: sys-apps/lsb-release -zlib: - debian,ubuntu: zlib1g-dev -autoproj: gem -ruby19: - debian: +ruby18: + debian,ubuntu: + - ruby1.8-dev + - ruby1.8 + - rubygems1.8 + - ri1.8 + - libopenssl-ruby1.8 + - rake + gentoo: + - dev-lang/ruby:1.8 + - rake +ruby19: + debian: - ruby1.9.1 - ruby1.9.1-dev - rubygems1.9.1 - rake - - rubygems-integration - arch: - - ruby - - rake - gentoo: - - dev-lang/ruby:1.9 - - rake - ubuntu: + ubuntu: - ruby1.9.1 - ruby1.9.1-dev - rubygems1.9.1 - ri1.9.1 - libopenssl-ruby1.9.1 - rake -ruby18: - debian,ubuntu: - - ruby1.8-dev - - ruby1.8 - - rubygems1.8 - - ri1.8 - - libopenssl-ruby1.8 + gentoo: + - dev-lang/ruby:1.9 - rake - gentoo: - - dev-lang/ruby:1.8 + arch: + - ruby - rake -svn: +build-essential: + debian,ubuntu: build-essential + gentoo: ignore + arch: ignore +libxml2: + debian,ubuntu: libxml2-dev + gentoo: dev-libs/libxml2 + arch: libxml2 +libxslt: + debian,ubuntu: libxslt1-dev + gentoo: dev-libs/libxslt + arch: libxslt +zlib: + debian,ubuntu: zlib1g-dev +autobuild: gem +autoproj: gem +git: + debian: + lenny: git + default: git-core + ubuntu: git-core + gentoo: dev-vcs/git + arch: git +svn: debian,ubuntu: subversion - arch: subversion gentoo: dev-util/subversion -archive: - debian,ubuntu: + arch: subversion +cmake: + debian,ubuntu: cmake + gentoo: dev-util/cmake + arch: cmake +autotools: + debian,ubuntu: + - automake1.9 + - autoconf + gentoo: + - sys-devel/automake:1.9 + - sys-devel/autoconf + arch: automake autoconf +lsb_release: + debian,ubuntu: lsb-release + gentoo: sys-apps/lsb-release + arch: ignore +archive: + debian,ubuntu: - tar - unzip - arch: - - tar - - unzip - gentoo: + gentoo: - app-arch/tar - app-arch/unzip -autobuild: gem -build-essential: - debian,ubuntu: build-essential - arch: ignore - gentoo: ignore + arch: + - tar + - unzip +cvs: + debian,ubuntu: cvs EODEFS Autoproj::OSDependencies.define_osdeps_mode_option osdeps_mode = Autoproj::OSDependencies.osdeps_mode