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