pkgset: Fix running without any koji tags

This commit is contained in:
Lubomír Sedlář 2019-11-11 13:35:30 +01:00
parent c373fbebc0
commit 8aab628374
2 changed files with 48 additions and 1 deletions

43
1295.patch Normal file
View File

@ -0,0 +1,43 @@
From d34b0d79002f127fbea4407b17a157dcdaaf045e Mon Sep 17 00:00:00 2001
From: Lubomír Sedlář <lsedlar@redhat.com>
Date: Nov 11 2019 08:30:37 +0000
Subject: pkgset: Fix running without any koji tags
All places in the code assume the option to not be required except for
this one line.
An obsolete comment is removed as well.
Relates: https://pagure.io/releng/failed-composes/issue/477
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
---
diff --git a/pungi/phases/pkgset/sources/source_koji.py b/pungi/phases/pkgset/sources/source_koji.py
index 187e6f1..c573ad8 100644
--- a/pungi/phases/pkgset/sources/source_koji.py
+++ b/pungi/phases/pkgset/sources/source_koji.py
@@ -588,6 +588,8 @@ def populate_global_pkgset(compose, koji_wrapper, path_prefix, event):
tag_to_mmd = {}
+ pkgset_koji_tags = force_list(compose.conf.get("pkgset_koji_tag", []))
+
for variant in compose.all_variants.values():
variant_tags[variant] = []
@@ -617,11 +619,9 @@ def populate_global_pkgset(compose, koji_wrapper, path_prefix, event):
if variant_tag not in compose_tags:
compose_tags.append(variant_tag)
- # TODO check if this works for Fedora Modular variant
- variant_tags[variant].extend(force_list(compose.conf["pkgset_koji_tag"]))
+ variant_tags[variant].extend(pkgset_koji_tags)
# Add global tag(s) if supplied.
- pkgset_koji_tags = force_list(compose.conf.get("pkgset_koji_tag", []))
compose_tags.extend(pkgset_koji_tags)
inherit = compose.conf["pkgset_koji_inherit"]

View File

@ -2,13 +2,14 @@
Name: pungi
Version: 4.1.40
Release: 2%{?dist}
Release: 3%{?dist}
Summary: Distribution compose tool
License: GPLv2
URL: https://pagure.io/pungi
Source0: https://pagure.io/releases/%{name}/%{name}-%{version}.tar.bz2
Patch1: https://pagure.io/pungi/pull-request/1292.patch
Patch2: https://pagure.io/pungi/pull-request/1295.patch
BuildRequires: python3-nose
BuildRequires: python3-mock
@ -142,6 +143,9 @@ nosetests-3 --exe
%{_bindir}/%{name}-wait-for-signed-ostree-handler
%changelog
* Mon Nov 11 2019 Lubomír Sedlář <lsedlar@redhat.com> - 4.1.40-3
- pkgset: Fix running without any koji tags
* Fri Nov 08 2019 Lubomír Sedlář <lsedlar@redhat.com> - 4.1.40-2
- Get message from LogRecord with a method