From 22a6291c8a5f8f196e289192425e96ae942e50da Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Mon, 20 Jun 2016 08:43:43 -0400 Subject: [PATCH] Remove hardcoded blacklists and whitelists from multilib_dnf. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lubomír Sedlář --- pungi/multilib_dnf.py | 54 ++----------------------------------------- 1 file changed, 2 insertions(+), 52 deletions(-) diff --git a/pungi/multilib_dnf.py b/pungi/multilib_dnf.py index 427bdd3b..f4528d57 100644 --- a/pungi/multilib_dnf.py +++ b/pungi/multilib_dnf.py @@ -20,45 +20,7 @@ import re import fnmatch -DEVEL_BLACKLIST = [ - "dmraid-devel", - "ghc-*", - "java-*-gcj-devel", - "java-*-icedtea-devel", - "java-*-openjdk-devel", - "kdeutils-devel", - "kernel-devel", - "mkinitrd-devel", - "php-devel", -] - - -DEVEL_WHITELIST = [ - "glibc-static", - "libstdc++-static", -] - - -RUNTIME_BLACKLIST = [ - "gcc", - "kernel", - "tomcat-native", -] - - -RUNTIME_WHITELIST = [ - "glibc-static", - "libflashsupport", - "libgnat", - "lmms-vst", - "nspluginwrapper", - "perl-libs", - "redhat-lsb", - "valgrind", - "wine", - "wine-arts", - "yaboot", -] +RE_SONAME = re.compile(r"^.*\.so\.\d+.*$") class Multilib(object): @@ -67,7 +29,6 @@ class Multilib(object): self.methods = [] self.blacklist = blacklist or [] self.whitelist = whitelist or [] - self.use_default_blacklists = True # use *_BLACKLIST and *_WHITELIST lists for i in methods: name = "method_%s" % i @@ -90,11 +51,6 @@ class Multilib(object): return True def method_devel(self, pkg): - if self.use_default_blacklists: - if self._match_any(pkg, DEVEL_BLACKLIST): - return False - if self._match_any(pkg, DEVEL_WHITELIST): - return True if pkg.name.endswith("-devel"): return True if pkg.name.endswith("-static"): @@ -109,15 +65,9 @@ class Multilib(object): return False def method_runtime(self, pkg): - if self.use_default_blacklists: - if self._match_any(pkg, RUNTIME_BLACKLIST): - return False - if self._match_any(pkg, RUNTIME_WHITELIST): - return True - so = re.compile(r"^.*\.so\.\d+.*$") for prov in pkg.provides: prov = str(prov) - if so.match(prov): + if RE_SONAME.match(prov): return True return False