#4268 ensure macros and env values passed to mock are strings
Merged 23 days ago by tkopecek. Opened 6 months ago by mikem.
mikem/koji rpm-env-strings  into  master

file modified
+2 -2
@@ -332,9 +332,9 @@ 

          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'])

  

Mock can error if a non-string is placed in the config. Arguably admins should set these values as strings, but this is easy to forget (and a little awkward to type) for simple ints.

Fixes https://pagure.io/koji/issue/4279

Metadata Update from @tkopecek:
- Pull-request tagged with: testing-ready

6 months ago

Metadata Update from @tkopecek:
- Pull-request untagged with: testing-ready
- Pull-request tagged with: testing-basic

2 months ago

Metadata Update from @mfilip:
- Pull-request tagged with: testing-done

a month ago

Commit 023e5d0 fixes this pull-request

Pull-Request has been merged by tkopecek

23 days ago
Metadata