pungi/0001-gather-Stop-requiring-comps-file-in-nodeps.patch
2017-07-20 15:05:40 +02:00

35 lines
1.2 KiB
Diff

From 32ca02efd6f59a271c660027c4576ab8ea09aef7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com>
Date: Thu, 20 Jul 2017 13:11:06 +0200
Subject: [PATCH 1/3] gather: Stop requiring comps file in nodeps
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
When there are no groups, we shouldn't try to read comps file (because
it may very well not be there).
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
---
pungi/phases/gather/methods/method_nodeps.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/pungi/phases/gather/methods/method_nodeps.py b/pungi/phases/gather/methods/method_nodeps.py
index 2979cd7..4b164be 100644
--- a/pungi/phases/gather/methods/method_nodeps.py
+++ b/pungi/phases/gather/methods/method_nodeps.py
@@ -103,6 +103,10 @@ def expand_groups(compose, arch, groups):
:returns: A set of tuples (pkg_name, arch)
"""
+ if not groups:
+ # No groups, nothing to do (this also covers case when there is no
+ # comps file.
+ return set()
comps_file = compose.paths.work.comps(arch, create_dir=False)
comps = CompsWrapper(comps_file)
packages = set()
--
2.9.4