How to set %vendor in mock?

Todd Zullinger tmz at pobox.com
Mon Nov 5 07:24:17 UTC 2007


Ralf Corsepius wrote:
> Hi,
> 
> in the past, I used to set up %vendor in mock by adding
> ...
> config_opts['macros'] += '%vendor       VENDOR'
> ...
> to customized mock *.cfgs.
> 
> 
> This stopped working with FC7's recent upgrade to mock-0.8.x:
> 
> # mock --configdir=/foo/etc/mock -r fedora-7-i386-test init
> INFO: mock suid wrapper version 0.8.4 
> ERROR: unsupported operand type(s) for +=: 'dict' and 'str'
> Traceback (most recent call last):
>  File "/usr/libexec/mock.py", line 333, in <module>
>    main(retParams)
>  File "/usr/libexec/mock.py", line 249, in main
>    execfile(cfg)
>  File "/foo/etc/mock/fedora-7-i386-test.cfg", line 7, in <module>
>    config_opts['macros'] += '%vendor   VENDOR'
> TypeError: unsupported operand type(s) for +=: 'dict' and 'str'
> 
> Any ideas?

I haven't tested this, but I just updated mock today and was looking
at the changes in the defaults.cfg file.  The example given there is:

config_opts['macros']['Add_your_macro_name_here'] = "add macro value here"

So I'd guess that you want to try something like this:

config_opts['macros']['vendor'] = "VENDOR"

-- 
Todd        OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Drugs may lead to nowhere, but at least it's the scenic route.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 542 bytes
Desc: not available
Url : http://lists.fedoraproject.org/pipermail/devel/attachments/20071105/db786f4a/attachment-0002.bin 


More information about the devel mailing list