ensure macros and env values passed to mock are strings

This commit is contained in:
Mike McLean 2024-11-20 13:03:19 -05:00 committed by Tomas Kopecek
parent 9e0d9612c9
commit d9795530d7

View file

@ -332,9 +332,9 @@ class BuildRoot(object):
for key in self.config['extra']:
if key.startswith('rpm.macro.'):
macro = '%' + key[10:]
opts['tag_macros'][macro] = self.config['extra'][key]
opts['tag_macros'][macro] = str(self.config['extra'][key])
elif key.startswith('rpm.env.'):
opts['tag_envvars'][key[8:]] = self.config['extra'][key]
opts['tag_envvars'][key[8:]] = str(self.config['extra'][key])
if 'mock.use_bootstrap' in self.config['extra']:
opts['use_bootstrap'] = bool(self.config['extra']['mock.use_bootstrap'])