Fix package whitelist for non-modular variants

This commit is contained in:
Lubomír Sedlář 2018-03-16 14:52:42 +01:00
parent 55cc5c7668
commit 8fa473b7a1
13 changed files with 75 additions and 12 deletions

View File

@ -1,7 +1,7 @@
From 659eb0215a7a53628533c195cb6dc6e461d8be27 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com>
Date: Tue, 7 Nov 2017 14:16:37 +0100
Subject: [PATCH 01/11] Support multiple sources in one variant
Subject: [PATCH 01/12] Support multiple sources in one variant
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

View File

@ -1,7 +1,7 @@
From de5dcc7e9ebb3c5b7201b404f302b9ac7dcab722 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com>
Date: Fri, 2 Mar 2018 08:33:37 +0100
Subject: [PATCH 02/11] Remove comps groups from purely modular variants
Subject: [PATCH 02/12] Remove comps groups from purely modular variants
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

View File

@ -1,7 +1,7 @@
From adcb2e23312914535dd71b15d4705c8101055836 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com>
Date: Tue, 6 Mar 2018 08:47:17 +0100
Subject: [PATCH 03/11] pkgset: Correctly detect single tag for variant
Subject: [PATCH 03/12] pkgset: Correctly detect single tag for variant
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

View File

@ -1,7 +1,7 @@
From fde41452c0bb030eb3467a87eaf25d7f789cba52 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com>
Date: Thu, 8 Mar 2018 09:07:48 +0100
Subject: [PATCH 04/11] image-build: Accept tar.xz extension for docker images
Subject: [PATCH 04/12] image-build: Accept tar.xz extension for docker images
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

View File

@ -1,7 +1,7 @@
From 63329d48c3bc1c72a7bacd654a3ce6e93f6041e7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com>
Date: Wed, 7 Mar 2018 12:35:33 +0100
Subject: [PATCH 05/11] Write package whitelist for each variant
Subject: [PATCH 05/12] Write package whitelist for each variant
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

View File

@ -1,7 +1,7 @@
From 1bfea4523b803917e37f81f83519721848012674 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com>
Date: Wed, 7 Mar 2018 13:42:09 +0100
Subject: [PATCH 06/11] gather: Honor package whitelist
Subject: [PATCH 06/12] gather: Honor package whitelist
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

View File

@ -1,7 +1,7 @@
From 74b0d14095733c66c54d47edaac69ef056f55332 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com>
Date: Wed, 7 Mar 2018 13:58:53 +0100
Subject: [PATCH 07/11] pkgset: Remove check for unique name
Subject: [PATCH 07/12] pkgset: Remove check for unique name
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

View File

@ -1,7 +1,7 @@
From 40c8f95b2bba62f454c7f996409e8bf1d775eee4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com>
Date: Wed, 7 Mar 2018 13:59:12 +0100
Subject: [PATCH 08/11] pkgset: Merge initial package set without checks
Subject: [PATCH 08/12] pkgset: Merge initial package set without checks
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

View File

@ -1,7 +1,7 @@
From 2dca0b0e3106f3c7252a5d0ad56f3943940e3fd0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com>
Date: Fri, 9 Mar 2018 13:45:03 +0100
Subject: [PATCH 09/11] gather: Fix package set whitelist
Subject: [PATCH 09/12] gather: Fix package set whitelist
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

View File

@ -1,7 +1,7 @@
From 1e6a0c19e78be15e2398bd1a462b5c8b41168155 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com>
Date: Tue, 13 Mar 2018 15:54:52 +0100
Subject: [PATCH 10/11] buildinstall: Add option to disable it
Subject: [PATCH 10/12] buildinstall: Add option to disable it
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

View File

@ -1,7 +1,7 @@
From 4481d1145e1ea4b0bc3ac3696491a01e633f6397 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com>
Date: Wed, 14 Mar 2018 08:17:50 +0100
Subject: [PATCH 11/11] pkgset: Allow empty list of modules
Subject: [PATCH 11/12] pkgset: Allow empty list of modules
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

View File

@ -0,0 +1,59 @@
From f3d33e74b30d5475de1f4a605858ba677596c408 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com>
Date: Fri, 16 Mar 2018 13:57:03 +0100
Subject: [PATCH 12/12] Fix modular content in non-modular variant
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
When allowing empty list of modules, the check for variant tags got
broken, causing Everything to no longer have an associated list of
allowed packages.
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
Relates: https://pagure.io/pungi/issue/862
---
pungi/wrappers/variants.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/pungi/wrappers/variants.py b/pungi/wrappers/variants.py
index 6bd00800..34ff215a 100755
--- a/pungi/wrappers/variants.py
+++ b/pungi/wrappers/variants.py
@@ -104,13 +104,13 @@ class VariantsXmlParser(object):
variant_dict["groups"].append(group)
for modulelist_node in variant_node.xpath("modules"):
+ variant_dict["modules"] = variant_dict["modules"] or []
for module_node in modulelist_node.xpath("module"):
module = {
"name": str(module_node.text),
"glob": self._is_true(module_node.attrib.get("glob", "false"))
}
- variant_dict["modules"] = variant_dict["modules"] or []
variant_dict["modules"].append(module)
for environments_node in variant_node.xpath("environments"):
@@ -205,7 +205,6 @@ class Variant(object):
modules=None):
environments = environments or []
- modules = modules or []
buildinstallpackages = buildinstallpackages or []
self.id = id
@@ -214,7 +213,9 @@ class Variant(object):
self.arches = sorted(copy.deepcopy(arches))
self.groups = sorted(copy.deepcopy(groups), key=lambda x: x["name"])
self.environments = sorted(copy.deepcopy(environments), key=lambda x: x["name"])
- self.modules = sorted(copy.deepcopy(modules), key=lambda x: x["name"])
+ self.modules = copy.deepcopy(modules)
+ if self.modules:
+ self.modules = sorted(self.modules, key=lambda x: x["name"])
self.buildinstallpackages = sorted(buildinstallpackages)
self.variants = {}
self.parent = parent
--
2.13.6

View File

@ -1,6 +1,6 @@
Name: pungi
Version: 4.1.22
Release: 9%{?dist}
Release: 10%{?dist}
Summary: Distribution compose tool
Group: Development/Tools
@ -18,6 +18,7 @@ Patch7: 0008-pkgset-Merge-initial-package-set-without-checks.patch
Patch8: 0009-gather-Fix-package-set-whitelist.patch
Patch9: 0010-buildinstall-Add-option-to-disable-it.patch
Patch10: 0011-pkgset-Allow-empty-list-of-modules.patch
Patch11: 0012-Fix-modular-content-in-non-modular-variant.patch
BuildRequires: python3-nose
BuildRequires: python3-mock
BuildRequires: python2-devel
@ -178,6 +179,9 @@ rm -rf %{buildroot}%{python2_sitelib}/%{name}_utils
%{_bindir}/%{name}-wait-for-signed-ostree-handler
%changelog
* Fri Mar 16 2018 Lubomír Sedlář <lsedlar@redhat.com> - 4.1.22-10
- Fix package whitelist for non-modular variants
* Wed Mar 14 2018 Lubomír Sedlář <lsedlar@redhat.com> - 4.1.22-9
- Allow empty modular variants
- Add option to disable multilib