From 1c4275bbfae1dcdb687ce0517aae750ea469ac73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Wed, 2 Aug 2023 16:38:23 +0200 Subject: [PATCH] Support require_all_comps_packages on DNF backend MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's not a great name anymore though, because it will fail the compose if any input package is missing, no matter whether it's from comps, prepopulate or additional_packages. JIRA: RHELCMP-12484 Signed-off-by: Lubomír Sedlář --- doc/configuration.rst | 4 ++++ pungi/gather_dnf.py | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/configuration.rst b/doc/configuration.rst index 70a0534c..fd6a7eeb 100644 --- a/doc/configuration.rst +++ b/doc/configuration.rst @@ -941,6 +941,10 @@ Options comps file can not be found in the package set. When disabled (the default), such cases are still reported as warnings in the log. + With ``dnf`` gather backend, this option will abort the compose on any + missing package no matter if it's listed in comps, ``additional_packages`` + or prepopulate file. + **gather_source_mapping** (*str*) -- JSON mapping with initial packages for the compose. The value should be a path to JSON file with following mapping: ``{variant: {arch: diff --git a/pungi/gather_dnf.py b/pungi/gather_dnf.py index 35b45d73..decabc09 100644 --- a/pungi/gather_dnf.py +++ b/pungi/gather_dnf.py @@ -542,7 +542,9 @@ class Gather(GatherBase): pkgs = self.q_binary_packages.filter(**kwargs).apply() if not pkgs: - self.logger.error("No package matches pattern %s" % pattern) + self.logger.error( + "Could not find a match for %s in any configured repo", pattern + ) # The pattern could have been a glob. In that case we want to # group the packages by name and get best match in those