From fcabf963e7c561d8ee14be6ead5988f8d694448e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Tue, 21 Nov 2017 15:25:02 +0100 Subject: [PATCH] Fix crash in modular compose --- ...t_packages_to_gather-returns-a-tuple.patch | 31 +++++++++++++++++++ pungi.spec | 7 ++++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 0001-gather-get_packages_to_gather-returns-a-tuple.patch diff --git a/0001-gather-get_packages_to_gather-returns-a-tuple.patch b/0001-gather-get_packages_to_gather-returns-a-tuple.patch new file mode 100644 index 00000000..0c1ccb6a --- /dev/null +++ b/0001-gather-get_packages_to_gather-returns-a-tuple.patch @@ -0,0 +1,31 @@ +From 4282525f652e79f1d98e58f8ef108547b7256f45 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= +Date: Thu, 9 Nov 2017 14:11:41 +0100 +Subject: [PATCH] gather: get_packages_to_gather returns a tuple +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +It always needs to return a tuple, otherwise there would be crashes. + +Signed-off-by: Lubomír Sedlář +--- + pungi/phases/gather/__init__.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pungi/phases/gather/__init__.py b/pungi/phases/gather/__init__.py +index 3b96abc..c4b27f0 100644 +--- a/pungi/phases/gather/__init__.py ++++ b/pungi/phases/gather/__init__.py +@@ -517,7 +517,7 @@ def get_packages_to_gather(compose, arch=None, variant=None, include_arch=True, + be included in a list of packages. + """ + if compose.conf["gather_source"] == "module": +- return [] ++ return ([], []) + + arches = [arch] if arch else compose.get_arches() + +-- +2.13.6 + diff --git a/pungi.spec b/pungi.spec index 0ea39080..f840c196 100644 --- a/pungi.spec +++ b/pungi.spec @@ -1,12 +1,13 @@ Name: pungi Version: 4.1.20 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Distribution compose tool Group: Development/Tools License: GPLv2 URL: https://pagure.io/pungi Source0: https://pagure.io/releases/%{name}/%{name}-%{version}.tar.bz2 +Patch0: 0001-gather-get_packages_to_gather-returns-a-tuple.patch BuildRequires: python-nose, python-mock BuildRequires: python-devel, python-setuptools, python2-productmd >= 1.3 BuildRequires: python-lockfile, kobo-rpmlib, createrepo_c @@ -99,6 +100,7 @@ notification to Fedora Message Bus. %prep %setup -q +%patch0 -p1 %build %{__python} setup.py build @@ -153,6 +155,9 @@ cd tests && ./test_compose.sh %{_bindir}/%{name}-wait-for-signed-ostree-handler %changelog +* Tue Nov 21 2017 Lubomír Sedlář - 4.1.20-2 +- Fix crash in modular compose + * Wed Nov 01 2017 Lubomír Sedlář - 4.1.20-1 - image-build: Drop suffixes from configuration (lsedlar) - kojiwrapper: Deal with multiple values for image-build (lsedlar)