Mock / Koji issues on EL5

Jeroen van Meeuwen kanarip at kanarip.com
Wed Apr 16 16:17:44 UTC 2008


Hello there,

I was about to send this mail about all kinds of errors I had not seen 
before, until I somehow ended up screwing around in the code and fixed 
like 6 things that I did wrong. Still one minor thing though:

On a CentOS 5, up-to-date box, I am running mock-0.9.7-1.el5, and 
koji-1.1-2.el5. I could not update to koji-1.2.3-1.el5 because it has a 
missing dependency on createrepo >= 0.4.11.

When using the following command (or submitting the build through koji):

mock --configdir=/etc/mock/koji -v -r dist-el5-build-3-3 rebuild 
~/rpmbuild/SRPMS/revisor-2.1.0-1rc5.src.rpm

The macros koji writes out in it's mock configuration file is a string, 
while mock expects a dict. I think this change made it in 
koji-1.2.3-1.el5, but for now...

I changed line 62 in mock/backend.py from:

         self.macros = config['macros']

into:

         self.macros = {}

         if isinstance(config['macros'], str):
             _macros = config['macros'].split('\n')
             while len(_macros) > 0:
                 (key, value) = _macros.pop(0).split(' ')
                 self.macros[key] = value
         else:
             self.macros = config['macros']

I hope this helps others on el5 running into this problem.

Kind regards,

Jeroen van Meeuwen
-kanarip




More information about the Fedora-buildsys-list mailing list