some macro values should not be overridable

This commit is contained in:
Mike McLean 2019-07-15 10:08:54 -04:00
parent 7e1809bafd
commit 4f4a17361d

View file

@ -1547,20 +1547,20 @@ name=build
'root_cache_enable': False
}
#XXX - this needs to be configurable
macros = {
'%_topdir' : '%s/build' % config_opts['chroothome'],
'%_rpmfilename' : '%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm',
'%_host_cpu' : opts.get('target_arch', arch),
'%_host': '%s-%s' % (opts.get('target_arch', arch), opts.get('mockhost', 'koji-linux-gnu')),
'%vendor' : opts.get('vendor', 'Koji'),
'%packager' : opts.get('packager', 'Koji'),
'%distribution': opts.get('distribution', 'Unknown')
#TODO - track some of these in the db instead?
}
# Load tag specific macros, which can override macros above
macros.update(opts.get('tag_macros', []))
macros.update(opts.get('tag_macros', {}))
# The following macro values cannot be overridden by tag options
macros['%_topdir'] = '%s/build' % config_opts['chroothome']
macros['%_host_cpu'] = opts.get('target_arch', arch)
macros['%_host'] = '%s-%s' % (opts.get('target_arch', arch), opts.get('mockhost', 'koji-linux-gnu'))
parts = ["""# Auto-generated by the Koji build system
"""]