Fix crash in modular compose

This commit is contained in:
Lubomír Sedlář 2017-11-21 15:25:02 +01:00
parent e9ca7f5c5b
commit fcabf963e7
2 changed files with 37 additions and 1 deletions

View File

@ -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?= <lsedlar@redhat.com>
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ář <lsedlar@redhat.com>
---
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

View File

@ -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ář <lsedlar@redhat.com> - 4.1.20-2
- Fix crash in modular compose
* Wed Nov 01 2017 Lubomír Sedlář <lsedlar@redhat.com> - 4.1.20-1
- image-build: Drop suffixes from configuration (lsedlar)
- kojiwrapper: Deal with multiple values for image-build (lsedlar)