added options to tag2distrepo

This commit is contained in:
Trevor Batley 2024-10-01 11:19:34 +10:00
parent 3268f81e7d
commit 1e2b89bec0

View File

@ -21,6 +21,13 @@ def tag2distrepo(cbtype, tag, build, user, force=False):
raise ValueError("Tag %s has no arches configured but tag2distrepo is enabled" % tag['name'])
keys = tag['extra'].get("tag2distrepo.keys", '').split()
compfile = tag['extra'].get("tag2distrepo.comp", 'none')
inherit = tag['extra'].get("tag2distrepo.inherit", False)
latest = tag['extra'].get("tag2distrepo.latest", False)
split_debuginfo = tag['extra'].get("tag2distrepo.split_debuginfo", False)
skip_missing = False
if tag['extra'].get("tag2distrepo.skip_missing_signatures"):
skip_missing = True
if keys:
logger.debug("Ensuring signed RPMs are written out")
@ -30,18 +37,33 @@ def tag2distrepo(cbtype, tag, build, user, force=False):
if rpm['sigkey'] == key:
write_signed_rpm(rpm['id'], key, False)
if tag['extra'].get("tag2distrepo.allow_missing_signatures"):
task_opts = {
'arch': tag['arches'].split(),
'comp': None,
'comp': compfile,
'delta': [],
'event': None,
'inherit': False,
'latest': False,
'inherit': inherit,
'latest': latest,
'multilib': False,
'split_debuginfo': False,
'skip_missing_signatures': False,
'split_debuginfo': split_debuginfo,
'skip_missing_signatures': skip_missing,
'allow_missing_signatures': True,
}
else:
task_opts = {
'arch': tag['arches'].split(),
'comp': compfile,
'delta': [],
'event': None,
'inherit': inherit,
'latest': latest,
'multilib': False,
'split_debuginfo': split_debuginfo,
'skip_missing_signatures': skip_missing,
'allow_missing_signatures': not keys,
}
logging.debug(
"Scheduling distRepo for tag %s, keys %s",
tag['name'],