From 8b4445e675ab52eff03f6c7fed064e1261adfb04 Mon Sep 17 00:00:00 2001 From: Markus Hilger Date: Sun, 1 Nov 2026 16:59:52 +0100 Subject: [PATCH] Query the release package in the image, not the host Without the rpm Python bindings, fingerprinting an image found its system-release provider in the image database but then ran rpm -qi against the host, so an image whose release package the host lacks was not recognized. Use the same rooted rpm command for both queries. --- imgutil/imgutil | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgutil/imgutil b/imgutil/imgutil index bb6bc28e..36a2ada1 100644 --- a/imgutil/imgutil +++ b/imgutil/imgutil @@ -1529,7 +1529,7 @@ def fingerprint_host_el(args, hostpath='/'): rver = subprocess.check_output(rpmcmd + ['-q', '--whatprovides', 'system-release']) if not isinstance(rver, str): rver = rver.decode('utf8') - for infline in subprocess.check_output('rpm -qi {0}'.format(rver).split()).decode('utf8').split('\n'): + for infline in subprocess.check_output(rpmcmd + ['-qi', rver.strip()]).decode('utf8').split('\n'): if ':' not in infline: continue k, v = infline.split(':', 1)