From ae1b1f0e05d9ca3039d455a706d25e131dfd66cb Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: May 19 2022 11:55:37 +0000 Subject: PR#3350: Configurable tag2distrepo options Merges #3350 https://pagure.io/koji/pull-request/3350 Relates: #2820 https://pagure.io/koji/issue/2820 RFE: Incorporate tag2distrepo --- diff --git a/docs/source/plugins.rst b/docs/source/plugins.rst index a8698a3..1a6994a 100644 --- a/docs/source/plugins.rst +++ b/docs/source/plugins.rst @@ -339,6 +339,12 @@ It uses the following options on a tag to control behaviour: - ``tag2distrepo.enabled``: set to "true" to enable automatic distrepos - ``tag2distrepo.keys``: set to a space-separated list of keys to use for distrepos +Following parameters correspond to relevant ``brew dist-repo`` options. + +- ``tag2distrepo.inherit``: follow inheritance (default: False) +- ``tag2distrepo.latest``: use only latest tagged builds (default: False) +- ``tag2distrepo.split_debuginfo``: separate directory for debuginfo default: False + The tag must have at least one arch configured on it. Installing plugin on Koji Hub diff --git a/plugins/hub/tag2distrepo.py b/plugins/hub/tag2distrepo.py index 0f69d36..a898d66 100644 --- a/plugins/hub/tag2distrepo.py +++ b/plugins/hub/tag2distrepo.py @@ -23,6 +23,9 @@ def tag2distrepo(cbtype, tag, build, user, force=False, strict=True): "Tag %s has no arches configured but tag2distrepo is enabled" % tag['name']) keys = tag['extra'].get("tag2distrepo.keys", '').split() + inherit = tag['extra'].get("tag2distrepo.inherit", False) + latest = tag['extra'].get("tag2distrepo.latest", False) + split_debuginfo = tag['extra'].get("tag2distrepo.split_debuginfo", False) if keys: logger.debug("Ensuring signed RPMs are written out") @@ -37,10 +40,10 @@ def tag2distrepo(cbtype, tag, build, user, force=False, strict=True): 'comp': None, 'delta': [], 'event': None, - 'inherit': False, - 'latest': False, + 'inherit': inherit, + 'latest': latest, 'multilib': False, - 'split_debuginfo': False, + 'split_debuginfo': split_debuginfo, 'skip_missing_signatures': False, 'allow_missing_signatures': not keys, }