config: Make pkgset_koji_tag optional

There are valid use cases for not specifying this option: specifically a
modular compose will get the tags to use from modules listed in the
variants file.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2017-11-07 14:05:50 +01:00
parent 51cd359057
commit 03293c725b
3 changed files with 4 additions and 6 deletions

View File

@ -446,8 +446,9 @@ Options
**pkgset_source** [mandatory] **pkgset_source** [mandatory]
(*str*) -- "koji" (any koji instance) or "repos" (arbitrary yum repositories) (*str*) -- "koji" (any koji instance) or "repos" (arbitrary yum repositories)
**pkgset_koji_tag** [mandatory] **pkgset_koji_tag**
(*str|[str]*) -- tag(s) to read package set from (*str|[str]*) -- tag(s) to read package set from. This option can be
omitted for modular composes.
**pkgset_koji_inherit** = True **pkgset_koji_inherit** = True
(*bool*) -- inherit builds from parent tags; we can turn it off only if we (*bool*) -- inherit builds from parent tags; we can turn it off only if we

View File

@ -1172,7 +1172,6 @@ CONFIG_DEPS = {
}, },
"pkgset_source": { "pkgset_source": {
"requires": [ "requires": [
(lambda x: x == "koji", ["pkgset_koji_tag"]),
(lambda x: x == "repos", ["pkgset_repos"]), (lambda x: x == "repos", ["pkgset_repos"]),
], ],
"conflicts": [ "conflicts": [

View File

@ -30,7 +30,6 @@ class PkgsetConfigTestCase(ConfigTestCase):
def test_validate_minimal_pkgset_koji(self): def test_validate_minimal_pkgset_koji(self):
cfg = load_config( cfg = load_config(
pkgset_source='koji', pkgset_source='koji',
pkgset_koji_tag="f25",
) )
self.assertValidation(cfg) self.assertValidation(cfg)
@ -64,8 +63,7 @@ class PkgsetConfigTestCase(ConfigTestCase):
self.assertValidation( self.assertValidation(
cfg, cfg,
[checks.REQUIRES.format('pkgset_source', 'koji', 'pkgset_koji_tag'), [checks.CONFLICTS.format('pkgset_source', 'koji', 'pkgset_repos')])
checks.CONFLICTS.format('pkgset_source', 'koji', 'pkgset_repos')])
def test_pkgset_multiple_koji_tags(self): def test_pkgset_multiple_koji_tags(self):
cfg = load_config( cfg = load_config(