From 2f40a457086cec03d00dc983d3bd20a9dd5eecae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Fri, 20 Jan 2017 13:15:36 +0100 Subject: [PATCH] Honor multilib_blacklist for initial packages matching a glob MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We want to exclude all multilib packages matching the blacklist (that are not noarch) from the package set. Signed-off-by: Lubomír Sedlář --- pungi/gather_dnf.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pungi/gather_dnf.py b/pungi/gather_dnf.py index 8ec9f3a2..846efaa7 100644 --- a/pungi/gather_dnf.py +++ b/pungi/gather_dnf.py @@ -321,6 +321,14 @@ class Gather(GatherBase): self.logger.debug("EXCLUDED by %s: %s", pattern, [str(p) for p in pkgs]) self.dnf._sack.add_excludes(pkgs) + for pattern in self.opts.multilib_blacklist: + with Profiler("Gather.add_initial_packages():exclude-multilib-blacklist"): + # TODO: does whitelist affect this in any way? + pkgs = self.q_multilib_binary_packages.filter(name__glob=pattern, arch__neq='noarch') + exclude.update(pkgs) + self.logger.debug("EXCLUDED by %s: %s", pattern, [str(p) for p in pkgs]) + self.dnf._sack.add_excludes(pkgs) + with Profiler("Gather.add_initial_packages():exclude-queries"): self.q_binary_packages = self.q_binary_packages.filter(pkg__neq=exclude).apply() self.q_native_binary_packages = self.q_native_binary_packages.filter(pkg__neq=exclude).apply()