From 11bbbae2ed25635b7352ba60ffb89648ba52ed20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Tue, 28 Jun 2016 08:48:15 +0200 Subject: [PATCH] Treat variants without comps groups as having all of them MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If the `` section is not specified in the variants XML file, all groups will be used in this variant. The section must be omitted completely, not just empty. This is (and was) correct according to the DTD, it just lead to crash before. Signed-off-by: Lubomír Sedlář --- pungi/phases/gather/sources/source_comps.py | 5 +++-- tests/data/dummy-variants.xml | 7 +++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/pungi/phases/gather/sources/source_comps.py b/pungi/phases/gather/sources/source_comps.py index 0e3d5cc2..02ae8554 100644 --- a/pungi/phases/gather/sources/source_comps.py +++ b/pungi/phases/gather/sources/source_comps.py @@ -48,8 +48,9 @@ class GatherSourceComps(pungi.phases.gather.source.GatherSourceBase): groups = set() comps = CompsWrapper(self.compose.paths.work.comps(arch=arch)) - if variant is not None: - # get packages for a particular variant + if variant is not None and variant.groups: + # Get packages for a particular variant. If the variant has no + # groups listed, all groups will be used. comps.filter_groups(variant.groups) for i in comps.get_comps_groups(): diff --git a/tests/data/dummy-variants.xml b/tests/data/dummy-variants.xml index e43446fc..ad485647 100644 --- a/tests/data/dummy-variants.xml +++ b/tests/data/dummy-variants.xml @@ -27,6 +27,13 @@ + + + i386 + x86_64 + + + i386