Matt Patterson wrote:
On 20/7/07 13:08, "Paul Howarth" <paul(a)city-fan.org>
wrote:
> Try this:
>
> config_opts['macros'] = """
> %%_topdir %s/build
> %%_rpmfilename %%%%{NAME}-%%%%{VERSION}-%%%%{RELEASE}.%%%%{ARCH}.rpm
> %%_dist bbc_gems
> """ % config_opts['chroothome']
Interesting, thanks, it worked a treat.
But, why do I have to set so many values: aren't _topdir and _rpmfilename
set elsewhere?
The mock source makes it look like setting config_opts['macros'] simply
prepends the string to a ~/.rpmmacros file, which I would've thought
wouldn't cause other things to be, what, undefined or redefined...
That's right, but config_opts['macros'] has a default value that's built
into mock, and that default value includes the definitions of those two
macros, so if you override the default then you need to define those
values or they won't be set anywhere.
Maybe something like this would be better:
config_opts['macros'] = config_opts['macros'] + """
%%_dist bc_gems
"""
Paul.