Problems specifying when config_opts['macros'] in a mock configuration file

Paul Howarth paul at city-fan.org
Fri Jul 20 12:08:16 UTC 2007


Matt Patterson wrote:
> Hello,
> 
> I'm trying to define some RPM macros using the config_opts['macros'] option
> in a mock.cfg as follows:
> 
> config_opts['macros'] = """
> %_dist bbc_gems
> """ 
> 
> When this section is present, mock fails with:
> 
> No Spec file found in srpm: rubygem-bbc_extractor-0.0.1-1.src.rpm
> 
> When I comment out the three lines above, it all works perfectly...
> 
> Am I doing something silly? Is there a better way to set up mock with
> per-configuration RPM macros?

Try this:

config_opts['macros'] = """
%%_topdir	%s/build
%%_rpmfilename	%%%%{NAME}-%%%%{VERSION}-%%%%{RELEASE}.%%%%{ARCH}.rpm
%%_dist		bbc_gems
""" % config_opts['chroothome']

Paul.




More information about the Fedora-buildsys-list mailing list