diff --git a/mock/py/mockbuild/plugins/package_state.py b/mock/py/mockbuild/plugins/package_state.py index 11bd475aa..2dd6f7bb1 100644 --- a/mock/py/mockbuild/plugins/package_state.py +++ b/mock/py/mockbuild/plugins/package_state.py @@ -50,10 +50,16 @@ def query_packages(fields, chrootpath=None, executor=sp_executor): # appears in rpm output? separator = '|/@' - package_list_cmd.append(separator.join(f"%{{{x}}}" for x in fields) + "\n") + def _map_key(key): + if key == "signature": + return "sigpgp:pgpsig" + return key + query_fields = [_map_key(f) for f in fields] + + package_list_cmd.append(separator.join(f"%{{{x}}}" for x in query_fields) + "\n") def _fixup(package): - key = "sigpgp:pgpsig" + key = "signature" if key in package: if package[key] == "(none)": package[key] = None @@ -149,7 +155,7 @@ def _installedPreBuildHook2(self): # mimic: https://docs.pagure.org/koji/content_generator_metadata/#buildroots query_fields = ["license", "name", "version", "release", "arch", "epoch", "nvra", "sigmd5", - "sigpgp:pgpsig"] + "signature"] def _executor(cmd): out, _ = self.buildroot.doOutChroot(cmd, returnOutput=True) return out