Improve Ubuntu arch detection (#2649)

Ubuntu uses a YY.{04,10} release scheme, where YY.04 is not necessarily
binary-compatible with YY.10.
This commit is contained in:
Michael Kuhn 2017-08-26 02:30:40 +02:00 committed by Todd Gamblin
parent c769e99eda
commit b94711a54f

View File

@ -48,6 +48,11 @@ def __init__(self):
# grab the first legal identifier in the version field. On
# debian you get things like 'wheezy/sid'; sid means unstable.
# We just record 'wheezy' and don't get quite so detailed.
version = re.split(r'[^\w-]', version)[0]
version = re.split(r'[^\w-]', version)
if 'ubuntu' in distname:
version = '.'.join(version[0:2])
else:
version = version[0]
super(LinuxDistro, self).__init__(distname, version)