Allow comps_file for any gather_source

This commit is contained in:
Lubomír Sedlář 2017-10-18 15:35:38 +02:00
parent 67f5f2d25e
commit 67a7bcd40c
2 changed files with 53 additions and 1 deletions

View File

@ -0,0 +1,47 @@
From 2819311d6e2151fd25a2d66fb3513341d0f7da05 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com>
Date: Wed, 18 Oct 2017 15:22:41 +0200
Subject: [PATCH] config: Allow comps_file for any gather_source
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
It only affects gathering packages when gather_source is set to comps,
but it could still make sense to include the file in the repository even
if the not used for gathering.
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
---
pungi/checks.py | 1 -
tests/test_config.py | 3 +--
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/pungi/checks.py b/pungi/checks.py
index d9f82c1..acb3f4b 100644
--- a/pungi/checks.py
+++ b/pungi/checks.py
@@ -1138,7 +1138,6 @@ CONFIG_DEPS = {
"gather_source": {
"conflicts": [
(lambda val: val != 'json', ['gather_source_mapping']),
- (lambda val: val != 'comps', ['comps_file']),
],
"requires": [
(lambda val: val == 'json', ['gather_source_mapping']),
diff --git a/tests/test_config.py b/tests/test_config.py
index 24bc72d..5f7d04b 100644
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -247,8 +247,7 @@ class GatherConfigTestCase(ConfigTestCase):
self.assertValidation(
cfg,
- [checks.REQUIRES.format('gather_source', 'json', 'gather_source_mapping'),
- checks.CONFLICTS.format('gather_source', 'json', 'comps_file')])
+ [checks.REQUIRES.format('gather_source', 'json', 'gather_source_mapping')])
class OSBSConfigTestCase(ConfigTestCase):
--
2.13.6

View File

@ -1,12 +1,13 @@
Name: pungi
Version: 4.1.19
Release: 2%{?dist}
Release: 3%{?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-config-Allow-comps_file-for-any-gather_source.patch
BuildRequires: python-nose, python-mock
BuildRequires: python-devel, python-setuptools, python2-productmd >= 1.3
@ -100,6 +101,7 @@ notification to Fedora Message Bus.
%prep
%setup -q
%patch0 -p1
%build
%{__python} setup.py build
@ -154,6 +156,9 @@ cd tests && ./test_compose.sh
%{_bindir}/%{name}-wait-for-signed-ostree-handler
%changelog
* Wed Oct 18 2017 Lubomír Sedlář <lsedlar@redhat.com> - 4.1.19-3
- Allow comps_file for any gather_source
* Mon Oct 02 2017 Lubomír Sedlář <lsedlar@redhat.com> - 4.1.19-2
- Update dependencies for EPEL 7