Following up here on two patches that were:
- posted in a ticket in April https://bugzilla.redhat.com/show_bug.cgi?id=1082832 - mailed to this list in July https://lists.fedoraproject.org/pipermail/rel-eng/2014-July/018149.html
I've rebased them again to be sure they cleanly apply against the master branch of the mash repo.
If there's anything I can do to modify them to make them acceptable or if I need to deliver them in some other way, please let me know.
mash/__init__.py | 18 ++++++++++-------- mash/config.py | 14 ++++++++++++++ mash/multilib.py | 40 +++++++++++++++++++--------------------- 3 files changed, 43 insertions(+), 29 deletions(-)
--- mash/__init__.py | 18 ++++++++++-------- mash/multilib.py | 25 ++++++++++++++----------- 2 files changed, 24 insertions(+), 19 deletions(-)
diff --git a/mash/__init__.py b/mash/__init__.py index 27cdc47..77957b5 100644 --- a/mash/__init__.py +++ b/mash/__init__.py @@ -456,14 +456,16 @@ class Mash: do_multi = self.config.multilib
try: - method = { 'base' : multilib.MultilibMethod, - 'devel' : multilib.DevelMultilibMethod, - 'file' : multilib.FileMultilibMethod, - 'kernel' : multilib.KernelMultilibMethod, - 'yaboot' : multilib.YabootMultilibMethod, - 'all' : multilib.AllMultilibMethod, - 'none' : multilib.NoMultilibMethod, - 'runtime' : multilib.RuntimeMultilibMethod}[self.config.multilib_method](self.config.multilib_file) + method = { + 'base' : multilib.MultilibMethod, + 'devel' : multilib.DevelMultilibMethod, + 'file' : multilib.FileMultilibMethod, + 'kernel' : multilib.KernelMultilibMethod, + 'yaboot' : multilib.YabootMultilibMethod, + 'all' : multilib.AllMultilibMethod, + 'none' : multilib.NoMultilibMethod, + 'runtime' : multilib.RuntimeMultilibMethod + }[self.config.multilib_method](self.config) except KeyError: self.logger.error("Invalid multilib method %s" % (self.config.multilib_method,)) do_multi = False diff --git a/mash/multilib.py b/mash/multilib.py index f2594b0..57f53f8 100644 --- a/mash/multilib.py +++ b/mash/multilib.py @@ -14,7 +14,7 @@ from fnmatch import fnmatch
class MultilibMethod: - def __init__(self, dummy): + def __init__(self, config): self.name = 'base' def select(self, po): prefer_64 = [ 'gdb', 'frysk', 'systemtap', 'systemtap-runtime', 'ltrace', 'strace' ] @@ -28,21 +28,22 @@ class MultilibMethod: return False
class NoMultilibMethod: - def __init__(self, dummy): + def __init__(self, config): self.name = 'none' - + def select(self, po): return False
class AllMultilibMethod(MultilibMethod): - def __init__(self, dummy): + def __init__(self, config): self.name = 'all' - + def select(self, po): return True
class FileMultilibMethod(MultilibMethod): - def __init__(self, file): + def __init__(self, config): + file = config.multilib_file self.name = 'file' self.list = [] if file: @@ -61,8 +62,9 @@ class FileMultilibMethod(MultilibMethod): return False
class KernelMultilibMethod: - def __init__(self, dummy): + def __init__(self, config): self.name = 'base' + def select(self, po): if po.arch.find('64') != -1: if po.name.startswith('kernel'): @@ -72,8 +74,9 @@ class KernelMultilibMethod: return False
class YabootMultilibMethod: - def __init__(self, dummy): + def __init__(self, config): self.name = 'base' + def select(self, po): if po.arch in ['ppc'] : if po.name.startswith('yaboot'): @@ -81,9 +84,9 @@ class YabootMultilibMethod: return False
class RuntimeMultilibMethod(MultilibMethod): - def __init__(self, dummy): + def __init__(self, config): self.name = 'runtime' - + def select(self, po): libdirs = [ '/usr/lib', '/usr/lib64', '/lib', '/lib64' ] blacklist = [ 'tomcat-native' ] @@ -181,7 +184,7 @@ class RuntimeMultilibMethod(MultilibMethod): return False
class DevelMultilibMethod(RuntimeMultilibMethod): - def __init__(self, dummy): + def __init__(self, config): self.name = 'devel'
def select(self, po):
--- mash/config.py | 14 ++++++++++++++ mash/multilib.py | 15 +++++---------- 2 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/mash/config.py b/mash/config.py index 81b65b6..1bc90bf 100644 --- a/mash/config.py +++ b/mash/config.py @@ -68,6 +68,20 @@ class MashDistroConfig(config.BaseConfig): multilib = config.Inherit(MashConfig.multilib) multilib_method = config.Inherit(MashConfig.multilib_method) multilib_file = config.Inherit(MashConfig.multilib_file) + multilib_devel_whitelist = config.ListOption() + multilib_devel_blacklist = config.ListOption([ + 'dmraid-devel', 'kdeutils-devel', 'mkinitrd-devel', + 'java-1.5.0-gcj-devel', 'java-1.7.0-icedtea-devel', + 'php-devel', 'java-1.6.0-openjdk-devel', + 'java-1.7.0-openjdk-devel', 'java-1.8.0-openjdk-devel', + ]) + multilib_runtime_whitelist = config.ListOption([ + 'libgnat', 'wine', 'lmms-vst', 'nspluginwrapper', + 'libflashsupport', 'valgrind', 'perl-libs', 'redhat-lsb', + 'yaboot', 'syslinux-extlinux-nonlinux', + 'syslinux-nonlinux', 'syslinux-tftpboot', + ]) + multilib_runtime_blacklist = config.ListOption(['tomcat-native']) arches = config.Inherit(MashConfig.arches) tag = config.Option() inherit = config.BoolOption(True) diff --git a/mash/multilib.py b/mash/multilib.py index 57f53f8..9dedc0c 100644 --- a/mash/multilib.py +++ b/mash/multilib.py @@ -89,11 +89,9 @@ class RuntimeMultilibMethod(MultilibMethod):
def select(self, po): libdirs = [ '/usr/lib', '/usr/lib64', '/lib', '/lib64' ] - blacklist = [ 'tomcat-native' ] - whitelist = [ 'libgnat', 'wine', 'lmms-vst', 'nspluginwrapper', 'libflashsupport', 'valgrind', 'perl-libs', 'redhat-lsb', 'yaboot', 'syslinux-extlinux-nonlinux', 'syslinux-nonlinux', 'syslinux-tftpboot' ] - if po.name in blacklist: + if po.name in self.config.multilib_runtime_blacklist: return False - if po.name in whitelist: + if po.name in self.config.multilib_runtime_whitelist: return True if MultilibMethod.select(self,po): return True @@ -186,14 +184,11 @@ class RuntimeMultilibMethod(MultilibMethod): class DevelMultilibMethod(RuntimeMultilibMethod): def __init__(self, config): self.name = 'devel' - + def select(self, po): - blacklist = ['dmraid-devel', 'kdeutils-devel', 'mkinitrd-devel', 'java-1.5.0-gcj-devel', 'java-1.7.0-icedtea-devel', 'php-devel', 'java-1.6.0-openjdk-devel', - 'java-1.7.0-openjdk-devel', 'java-1.8.0-openjdk-devel' ] - whitelist = [] - if po.name in blacklist: + if po.name in self.config.multilib_devel_blacklist: return False - if po.name in whitelist: + if po.name in self.config.multilib_devel_whitelist: return True if RuntimeMultilibMethod.select(self,po): return True
On Thu, Jan 29, 2015 at 03:50:22PM -0500, Ralph Bean wrote:
Following up here on two patches that were:
- posted in a ticket in April https://bugzilla.redhat.com/show_bug.cgi?id=1082832
- mailed to this list in July https://lists.fedoraproject.org/pipermail/rel-eng/2014-July/018149.html
I've rebased them again to be sure they cleanly apply against the master branch of the mash repo.
If there's anything I can do to modify them to make them acceptable or if I need to deliver them in some other way, please let me know.
mash/__init__.py | 18 ++++++++++-------- mash/config.py | 14 ++++++++++++++ mash/multilib.py | 40 +++++++++++++++++++--------------------- 3 files changed, 43 insertions(+), 29 deletions(-)
Is there anything I can do to help these commits along with review?
rel-eng@lists.fedoraproject.org