From 2c614164238c30db7fca4ea125172df0d6ba02d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Fri, 22 Sep 2023 13:32:20 +0200 Subject: [PATCH] gather-dnf: Support dotarch in filter_packages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lubomír Sedlář --- pungi/gather_dnf.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pungi/gather_dnf.py b/pungi/gather_dnf.py index 8d64dfa1..4ff23aa5 100644 --- a/pungi/gather_dnf.py +++ b/pungi/gather_dnf.py @@ -40,7 +40,7 @@ def get_source_name(pkg): return pkg.sourcerpm.rsplit("-", 2)[0] -def filter_dotarch(queue, pattern): +def filter_dotarch(queue, pattern, **kwargs): """Filter queue for packages matching the pattern. If pattern matches the dotarch format of ., it is processed as such. Otherwise it is treated as just a name. @@ -465,12 +465,16 @@ class Gather(GatherBase): name__glob=pattern[:-4], reponame__neq=self.opts.lookaside_repos ) elif pungi.util.pkg_is_debug(pattern): - pkgs = self.q_debug_packages.filter( - name__glob=pattern, reponame__neq=self.opts.lookaside_repos + pkgs = filter_dotarch( + self.q_debug_packages, + pattern, + reponame__neq=self.opts.lookaside_repos, ) else: - pkgs = self.q_binary_packages.filter( - name__glob=pattern, reponame__neq=self.opts.lookaside_repos + pkgs = filter_dotarch( + self.q_binary_packages, + pattern, + reponame__neq=self.opts.lookaside_repos, ) exclude.update(pkgs)