From 48c868e935c2fc2b9e03e1f59b5db90958a26c19 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 14 Dec 2020 10:23:05 -0500 Subject: [PATCH] Detect architecture for CentOS stream CentOS stream changed the release rpm to be noarch. --- confluent_server/confluent/osimage.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/confluent_server/confluent/osimage.py b/confluent_server/confluent/osimage.py index 7009860b..529546c1 100644 --- a/confluent_server/confluent/osimage.py +++ b/confluent_server/confluent/osimage.py @@ -252,6 +252,11 @@ def check_centos(isoinfo): 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') return {'name': 'centos{2}-{0}-{1}'.format(ver, arch, isstream), 'method': EXTRACT, 'category': cat} def check_esxi(isoinfo):