bin/autoproj_bootstrap in autoproj-1.13.0.b3 vs bin/autoproj_bootstrap in autoproj-1.13.0.b4

- old
+ new

@@ -1793,16 +1793,29 @@ end Autobuild.progress :operating_system_autodetection, "autodetecting the operating system" names, versions = os_from_os_release - # Don't use the os-release information on Debian, since they - # refuse to put enough information to detect 'unstable' - # reliably. So, we use the heuristic method for it - if !names || names[0] == 'debian' + if !names names, versions = guess_operating_system end + + # on Debian, they refuse to put enough information to detect + # 'unstable' reliably. So, we use the heuristic method for it + if names[0] = "debian" + # check if we actually got a debian with the "unstable" (sid) + # flavour. it seems that "/etc/debian_version" does not contain + # "sid" (but "8.0" for example) during the feature freeze + # phase... + if File.exists?('/etc/debian_version') + debian_versions = [File.read('/etc/debian_version').strip] + if debian_versions.first =~ /sid/ + versions = ["unstable", "sid"] + end + end + # otherwise "versions" contains the result it previously had + end return if !names names = ensure_derivatives_refer_to_their_parents(names) names, versions = normalize_os_representation(names, versions) @@ -1839,11 +1852,10 @@ def self.os_from_lsb if !Autobuild.find_in_path('lsb_release') return end - distributor = `lsb_release -i -s` - distributor = distributor.strip.downcase + distributor = [`lsb_release -i -s`.strip.downcase] codename = `lsb_release -c -s`.strip.downcase version = `lsb_release -r -s`.strip.downcase return [distributor, [codename, version]] end