FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Build System

 
 
LinkBack Thread Tools
 
Old 07-14-2011, 08:20 PM
 
Default Allow mash to export arbitrary packages in multilib repositories

Hello,



In one of our project, we tried to use
the 'multilib_method = file' in the configuration_file.mash; however it
seems like that the current version of mash doesn't correctly supports
it.



The constructor of FileMultilibMethod,
implemented on multilib.py, demands a valid path for a file containing
a list o packages to be exported. However the method detectMultilibMethod
implemented on __init__.py doesn't provide it; thus the program crashes.



I would like to know if I may suggest
a modification that apparently fix this issue. This would allow the user
provide the file through the option 'multilib_file = file_list.multilib',
where file_list.multilib must be on the same directory of the configuration_file.mash.

*

Thank you for all your attention.





--

Joćo Paulo Fernandes Ventura

Linux Technology Center Brazil Software Engineer

IBM Systems & Technology Group

joaopfv@br.ibm.com

--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
 
Old 07-14-2011, 09:07 PM
Bill Nottingham
 
Default Allow mash to export arbitrary packages in multilib repositories

joaopfv@br.ibm.com (joaopfv@br.ibm.com) said:
> In one of our project, we tried to use the 'multilib_method = file' in the
> configuration_file.mash; however it seems like that the current version of
> mash doesn't correctly supports it.
>
> The constructor of FileMultilibMethod, implemented on multilib.py, demands
> a valid path for a file containing a list o packages to be exported.
> However the method detectMultilibMethod implemented on __init__.py doesn't
> provide it; thus the program crashes.
>
> I would like to know if I may suggest a modification that apparently fix
> this issue. This would allow the user provide the file through the option
> 'multilib_file = file_list.multilib', where file_list.multilib must be on
> the same directory of the configuration_file.mash.

Patch 371/371? I'm curious what the first 370 patches are.

In any case, does this modified version work for you? I find it a little
cleaner.

Bill
diff --git a/mash/__init__.py b/mash/__init__.py
index 719f76b..9646248 100644
--- a/mash/__init__.py
+++ b/mash/__init__.py
@@ -441,7 +441,7 @@ class Mash:
'kernel' : multilib.KernelMultilibMethod,
'all' : multilib.AllMultilibMethod,
'none' : multilib.NoMultilibMethod,
- 'runtime' : multilib.RuntimeMultilibMethod}[self.config.multilib_method]()
+ 'runtime' : multilib.RuntimeMultilibMethod}[self.config.multilib_method](self.config.multilib_file)
except KeyError:
self.logger.error("Invalid multilib method %s" % (self.config.multilib_method,))
do_multi = False
diff --git a/mash/config.py b/mash/config.py
index c94ea4a..e456146 100644
--- a/mash/config.py
+++ b/mash/config.py
@@ -28,6 +28,7 @@ class MashConfig(config.BaseConfig):
debuginfo_path = config.Option('%(arch)s/debug')
multilib = config.BoolOption(True)
multilib_method = config.Option('devel')
+ multilib_file = config.Option()
arches = config.ListOption()
keys = config.ListOption()
configdir = config.Option('/etc/mash')
@@ -62,10 +63,12 @@ class MashDistroConfig(config.BaseConfig):
debuginfo_path = config.Inherit(MashConfig.debuginfo_path)
multilib = config.Inherit(MashConfig.multilib)
multilib_method = config.Inherit(MashConfig.multilib_method)
+ multilib_file = config.Inherit(MashConfig.multilib_file)
arches = config.Inherit(MashConfig.arches)
tag = config.Option()
inherit = config.BoolOption(True)
keys = config.Inherit(MashConfig.keys)
+ configdir = config.Inherit(MashConfig.configdir)
strict_keys = config.Inherit(MashConfig.strict_keys)
buildhost = config.Inherit(MashConfig.buildhost)
repodir = config.Inherit(MashConfig.repodir)
@@ -122,6 +125,8 @@ def readMainConfig(conf):
if not thisdistro.repodata_path:
thisdistro.repodata_path = os.path.dirname(thisdistro.rpm_path)
thisdistro.keys = map(string.lower, thisdistro.keys)
+ if thisdistro.multilib_file and thisdistro.multilib_file[0] != '/':
+ thisdistro.multilib_file = os.path.join(thisdistro.configdir, thisdistro.multilib_file)
if len(thisdistro.keys) == 0:
thisdistro.keys = [']
config.distros.append(thisdistro)
diff --git a/mash/multilib.py b/mash/multilib.py
index 1c4e6cb..81fdf4a 100644
--- a/mash/multilib.py
+++ b/mash/multilib.py
@@ -14,7 +14,7 @@
from fnmatch import fnmatch

class MultilibMethod:
- def __init__(self):
+ def __init__(self, dummy):
self.name = 'base'
def select(self, po):
prefer_64 = [ 'gdb', 'frysk', 'systemtap', 'systemtap-runtime', 'ltrace', 'strace' ]
@@ -28,14 +28,14 @@ class MultilibMethod:
return False

class NoMultilibMethod:
- def __init__(self):
+ def __init__(self, dummy):
self.name = 'none'

def select(self, po):
return False

class AllMultilibMethod(MultilibMethod):
- def __init__(self):
+ def __init__(self, dummy):
self.name = 'all'

def select(self, po):
@@ -52,7 +52,7 @@ class FileMultilibMethod(MultilibMethod):
for line in lines:
line = line.strip()
if not line.startswith('#'):
- list.append(line)
+ self.list.append(line)

def select(self, po):
for item in self.list:
@@ -61,7 +61,7 @@ class FileMultilibMethod(MultilibMethod):
return False

class KernelMultilibMethod:
- def __init__(self):
+ def __init__(self, dummy):
self.name = 'base'
def select(self, po):
if po.arch.find('64') != -1:
@@ -72,7 +72,7 @@ class KernelMultilibMethod:
return False

class RuntimeMultilibMethod(MultilibMethod):
- def __init__(self):
+ def __init__(self, dummy):
self.name = 'runtime'

def select(self, po):
@@ -160,7 +160,7 @@ class RuntimeMultilibMethod(MultilibMethod):
return False

class DevelMultilibMethod(RuntimeMultilibMethod):
- def __init__(self):
+ def __init__(self, dummy):
self.name = 'devel'

def select(self, po):
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
 
Old 07-19-2011, 03:39 PM
 
Default Allow mash to export arbitrary packages in multilib repositories

Hello,



The modified version seems to be working
fine to us.



In order to solve the bug and make the __init__.doDepSolveAndMultilib method,
I removed the dictionary that decides which multilib method should be called.
In its place there is a method name detectMultilibMethod.



Thank you for all your attention,







P.S. Sorry for the wrong patch on the previous email. :-)

--

Joćo Paulo Fernandes Ventura

Linux Technology Center Brazil Software Engineer

IBM Systems & Technology Group

joaopfv@br.ibm.com










Bill Nottingham <notting@redhat.com>


Sent by: buildsys-bounces@lists.fedoraproject.org

15/07/2011 12:25



Please respond to

Discussion of Fedora build system <buildsys@lists.fedoraproject.org>






To
Discussion of Fedora build system <buildsys@lists.fedoraproject.org>


cc



Subject
Re: Allow mash to export arbitrary packages
in multilib repositories













joaopfv@br.ibm.com (joaopfv@br.ibm.com) said:

> In one of our project, we tried to use the 'multilib_method = file'
in the

> configuration_file.mash; however it seems like that the current version
of

> mash doesn't correctly supports it.

>

> The constructor of FileMultilibMethod, implemented on multilib.py,
demands

> a valid path for a file containing a list o packages to be exported.


> However the method detectMultilibMethod implemented on __init__.py
doesn't

> provide it; thus the program crashes.

>

> I would like to know if I may suggest a modification that apparently
fix

> this issue. This would allow the user provide the file through the
option

> 'multilib_file = file_list.multilib', where file_list.multilib must
be on

> the same directory of the configuration_file.mash.



Patch 371/371? I'm curious what the first 370 patches are.



In any case, does this modified version work for you? I find it a little

cleaner.



Bill

--

buildsys mailing list

buildsys@lists.fedoraproject.org

https://admin.fedoraproject.org/mailman/listinfo/buildsys

--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
 
Old 07-22-2011, 06:04 PM
Bill Nottingham
 
Default Allow mash to export arbitrary packages in multilib repositories

joaopfv@br.ibm.com (joaopfv@br.ibm.com) said:
> Hello,
>
> The modified version seems to be working fine to us.

OK, built in rawhide.

Thanks for the initial patch!

Bill
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
 

Thread Tools




All times are GMT. The time now is 08:34 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org