From b78878ac6905d077f0325ebfa72e6cbc250ed626 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Tue, 12 Jan 2016 17:00:15 +0100 Subject: [PATCH] Make system release package filtering optional MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fedora variants needs both general fedora-release and fedora-release-$variant packages installed. This patch disables the code that would throw fedora-release away (assuming correct config is set). Signed-off-by: Lubomír Sedlář --- doc/configuration.rst | 5 +++++ pungi/phases/gather/__init__.py | 13 ++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/doc/configuration.rst b/doc/configuration.rst index 149bf6b1..ae010266 100644 --- a/doc/configuration.rst +++ b/doc/configuration.rst @@ -383,6 +383,11 @@ Options **filter_packages** (*list*) -- packages to be excluded from a variant and architecture; format: [(variant_uid_regex, {arch|*: [package_globs]})] +**filter_system_release_packages** + (*bool*) -- for each variant, figure out the best system release package + and filter out all others. This will not work if a variant needs more than + one system release package. In such case, set this option to ``False``. + **multilib_blacklist** (*dict*) -- multilib blacklist; format: {arch|*: [package_globs]} diff --git a/pungi/phases/gather/__init__.py b/pungi/phases/gather/__init__.py index 532edf60..09c6e4fc 100644 --- a/pungi/phases/gather/__init__.py +++ b/pungi/phases/gather/__init__.py @@ -86,6 +86,11 @@ class GatherPhase(PhaseBase): "expected_types": [bool], "optional": True, }, + { + "name": "filter_system_release_packages", + "expected_types": [bool], + "optional": True, + }, # DEPRECATED OPTIONS { "name": "additional_packages_multiarch", @@ -446,9 +451,11 @@ def get_variant_packages(compose, arch, variant, package_sets=None): packages |= get_additional_packages(compose, arch, variant) filter_packages |= get_filter_packages(compose, arch, variant) - system_release_packages, system_release_filter_packages = get_system_release_packages(compose, arch, variant, package_sets) - packages |= system_release_packages - filter_packages |= system_release_filter_packages + if not compose.conf.get('filter_system_release_packages', False): + system_release_packages, system_release_filter_packages = get_system_release_packages( + compose, arch, variant, package_sets) + packages |= system_release_packages + filter_packages |= system_release_filter_packages # if the variant is "optional", include all groups and packages # from the main "variant" and all "addons"