From f9a82bde00aca90634b7e30a60ad90dd277121d3 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 14 Dec 2020 10:42:52 -0500 Subject: [PATCH] Fix arch detection in CentOS stream --- confluent_server/confluent/osimage.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/confluent_server/confluent/osimage.py b/confluent_server/confluent/osimage.py index 529546c1..fedf4fd2 100644 --- a/confluent_server/confluent/osimage.py +++ b/confluent_server/confluent/osimage.py @@ -246,17 +246,17 @@ def check_centos(isoinfo): break elif 'centos-stream-release-8' in entry: ver = entry.split('-')[3] - arch = entry.split('.')[-3] + arch = entry.split('.')[-2] cat = 'el8' isstream = '_stream' break else: return None if arch == 'noarch' and '.discinfo' in isoinfo[1]: - prodinfo = isoinfo[1]['.discinfo'] - arch = prodinfo.split(b'\n')[2] - if not isinstance(arch, str): - arch = arch.decode('utf-8') + prodinfo = isoinfo[1]['.discinfo'] + arch = prodinfo.split(b'\n')[2] + if not isinstance(arch, str): + arch = arch.decode('utf-8') return {'name': 'centos{2}-{0}-{1}'.format(ver, arch, isstream), 'method': EXTRACT, 'category': cat} def check_esxi(isoinfo):