diff --git a/doc/configuration.rst b/doc/configuration.rst index e2150283..00e92473 100644 --- a/doc/configuration.rst +++ b/doc/configuration.rst @@ -113,6 +113,12 @@ Example base_product_short = "Fedora" base_product_version = "23" +**tree_arches** + ([*str*]) -- list of architectures which should be included; if undefined, all architectures from variants.xml will be included + +**tree_variants** + ([*str*]) -- list of variants which should be included; if undefined, all variants from variants.xml will be included + General Settings ================ @@ -144,6 +150,8 @@ Options Please note that ``*`` as a wildcard matches all architectures but ``src``. + tree_arches = ["x86_64"] + tree_variants = ["Server"] Example ------- diff --git a/pungi/compose.py b/pungi/compose.py index 98438ead..8a2593fa 100644 --- a/pungi/compose.py +++ b/pungi/compose.py @@ -215,7 +215,10 @@ class Compose(kobo.log.LoggingBase): def get_variants(self, types=None, arch=None, recursive=False): result = [] types = types or ["variant", "optional", "addon", "layered-product"] + tree_variants = self.conf.get("tree_variants", None) for i in self.variants.values(): + if tree_variants and i.name not in tree_variants: + continue if i.type in types: if arch and arch not in i.arches: continue