Support tag specific environment variables
This makes it possible to specify an environment variable for a tag that will be used during builds. e.g. koji edit-tag -x rpm.env.CC=clang
This commit is contained in:
parent
62ce45b104
commit
afc0efb122
3 changed files with 19 additions and 0 deletions
|
|
@ -293,10 +293,13 @@ class BuildRoot(object):
|
|||
if self.internal_dev_setup is not None:
|
||||
opts['internal_dev_setup'] = bool(self.internal_dev_setup)
|
||||
opts['tag_macros'] = {}
|
||||
opts['tag_envvars'] = {}
|
||||
for key in self.config['extra']:
|
||||
if key.startswith('rpm.macro.'):
|
||||
macro = '%' + key[10:]
|
||||
opts['tag_macros'][macro] = self.config['extra'][key]
|
||||
elif key.startswith('rpm.env.'):
|
||||
opts['tag_envvars'][key[8:]] = self.config['extra'][key]
|
||||
output = koji.genMockConfig(self.name, self.br_arch, managed=True, **opts)
|
||||
|
||||
# write config
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue