[PATCH 3/3] [backend] Add macros to mockchain define arguments

Stanislav Ochotnicky sochotnicky at redhat.com
Tue Nov 19 15:48:53 UTC 2013


---
 backend/mockremote.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/backend/mockremote.py b/backend/mockremote.py
index b266c7a..587c827 100755
--- a/backend/mockremote.py
+++ b/backend/mockremote.py
@@ -297,6 +297,12 @@ class Builder(object):
         for r in self.repos:
             buildcmd += '-a %s ' % r
 
+        if self.mockremote.macros:
+            mock_opts = ['--define {k}={v}'.format(k=k,v=v) for k, v in
+                    self.mockremote.macros.items()]
+            if mock_opts:
+                buildcmd += "-m '{mopts}' ".format(mopts=" ".join(mock_opts))
+
         buildcmd += dest
 
         #print '  Running %s on %s' % (buildcmd, hostname)
-- 
1.8.4



More information about the copr-devel mailing list