Make system release package filtering optional

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ář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2016-01-12 17:00:15 +01:00
parent 195b13d434
commit b78878ac69
2 changed files with 15 additions and 3 deletions

View File

@ -383,6 +383,11 @@ Options
**filter_packages** **filter_packages**
(*list*) -- packages to be excluded from a variant and architecture; format: [(variant_uid_regex, {arch|*: [package_globs]})] (*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** **multilib_blacklist**
(*dict*) -- multilib blacklist; format: {arch|*: [package_globs]} (*dict*) -- multilib blacklist; format: {arch|*: [package_globs]}

View File

@ -86,6 +86,11 @@ class GatherPhase(PhaseBase):
"expected_types": [bool], "expected_types": [bool],
"optional": True, "optional": True,
}, },
{
"name": "filter_system_release_packages",
"expected_types": [bool],
"optional": True,
},
# DEPRECATED OPTIONS # DEPRECATED OPTIONS
{ {
"name": "additional_packages_multiarch", "name": "additional_packages_multiarch",
@ -446,7 +451,9 @@ def get_variant_packages(compose, arch, variant, package_sets=None):
packages |= get_additional_packages(compose, arch, variant) packages |= get_additional_packages(compose, arch, variant)
filter_packages |= get_filter_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) 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 packages |= system_release_packages
filter_packages |= system_release_filter_packages filter_packages |= system_release_filter_packages