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

- old
+ new

@@ -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 = [] + found_keys = Hash.new 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,24 +995,29 @@ 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) - - if rec_found - idx = keys.index(matching_name) + # 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 found_keys[idx] ||= [0, []] found_keys[idx][0] += rec_found found_keys[idx][1].concat(rec_result) end - - # We only consider the first matching entry - keys = nil end end end - if found_keys = found_keys.compact.first + first_entry = found_keys.keys.sort.first + found_keys = found_keys[first_entry] + if found_keys if found_keys[0] > 0 nonexistent = true else found = true end @@ -1738,88 +1743,88 @@ @root_dir = Dir.pwd end DEFS = <<EODEFS --- -build-essential: +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: ignore - debian,ubuntu: build-essential + gentoo: sys-apps/lsb-release +zlib: + debian,ubuntu: zlib1g-dev +autoproj: gem ruby19: - ubuntu: + debian: - ruby1.9.1 - ruby1.9.1-dev - rubygems1.9.1 - - ri1.9.1 - - libopenssl-ruby1.9.1 - rake + - rubygems-integration arch: - ruby - rake gentoo: - dev-lang/ruby:1.9 - rake - debian: + ubuntu: - ruby1.9.1 - ruby1.9.1-dev - rubygems1.9.1 + - ri1.9.1 + - libopenssl-ruby1.9.1 - rake - - rubygems-integration ruby18: - gentoo: - - dev-lang/ruby:1.8 - - rake debian,ubuntu: - ruby1.8-dev - ruby1.8 - rubygems1.8 - ri1.8 - libopenssl-ruby1.8 - rake + gentoo: + - dev-lang/ruby:1.8 + - rake +svn: + debian,ubuntu: subversion + arch: subversion + gentoo: dev-util/subversion archive: + debian,ubuntu: + - tar + - unzip arch: - tar - unzip gentoo: - app-arch/tar - app-arch/unzip - debian,ubuntu: - - tar - - unzip -cmake: - arch: cmake - gentoo: dev-util/cmake - debian,ubuntu: cmake -svn: - arch: subversion - gentoo: dev-util/subversion - debian,ubuntu: subversion autobuild: gem -autotools: - arch: automake autoconf - gentoo: - - sys-devel/automake:1.9 - - sys-devel/autoconf - debian,ubuntu: - - automake1.9 - - autoconf -git: - ubuntu: git-core - arch: git - gentoo: dev-vcs/git - debian: - lenny: git - default: git-core -none: ignore -cvs: - debian,ubuntu: cvs -lsb_release: +build-essential: + debian,ubuntu: build-essential arch: ignore - gentoo: sys-apps/lsb-release - debian,ubuntu: lsb-release -autoproj: gem -zlib: - debian,ubuntu: zlib1g-dev + gentoo: ignore EODEFS Autoproj::OSDependencies.define_osdeps_mode_option osdeps_mode = Autoproj::OSDependencies.osdeps_mode