Skip to content

Commit

Permalink
signature hack
Browse files Browse the repository at this point in the history
  • Loading branch information
praiskup committed Aug 22, 2024
1 parent 6c53ff3 commit 5b9e81e
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions mock/py/mockbuild/plugins/package_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5b9e81e

Please sign in to comment.