Skip to contentSkip to conversation

forcebuild: allow build with default options

PATCH In review Jose Lamego 3 participants 3 messages Jun 1, 2017 – Jun 2, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 forcebuild: allow build with default options

From: Anibal Limon <[email protected]>

A forced build fails if no options are passed through command line (using "-o OPTIONS").

This change allows build to use default options if none are passed at the command line.

---
 bin/forcebuild.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
bin/forcebuild.py +5 -1
index 5fe61a0..e6770a4 100755
@@ -108,7 +108,11 @@ class YoctoAutobuilderAPI(object):
                     % (builder, state))
             return 1
 
-        opts = eval(opts) # FIXME: transform string argument into dictionary, security?
+        if opts:
+            # FIXME: transform string argument into dictionary, security?
+            opts = eval(opts)
+        else:
+            opts = {}
         current_opts = self._get_options_by_builder(builder)
         for opt in opts:
             if not opt in current_opts:
Signature · 1 line
2.7.4
#1 lore raw

+ Joshua

Quoted 31 lines · Jose Lamego

From: Anibal Limon <[email protected]>

A forced build fails if no options are passed through command line (using "-o OPTIONS").

This change allows build to use default options if none are passed at the command line.

---
 bin/forcebuild.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
bin/forcebuild.py +5 -1
index 5fe61a0..e6770a4 100755
@@ -108,7 +108,11 @@ class YoctoAutobuilderAPI(object):
                     % (builder, state))
             return 1
 
-        opts = eval(opts) # FIXME: transform string argument into dictionary, security?
+        if opts:
+            # FIXME: transform string argument into dictionary, security?
+            opts = eval(opts)
+        else:
+            opts = {}
         current_opts = self._get_options_by_builder(builder)
         for opt in opts:
             if not opt in current_opts:
#2 lore raw
In reply to Jose Lamego
Quoted 7 lines · Jose Lamego

From: Anibal Limon <[email protected]>

A forced build fails if no options are passed through command line (using "-o OPTIONS").

This change allows build to use default options if none are passed at the command line.

Useful. Merged, thanks!

Joshua

Quoted 27 lines

---
 bin/forcebuild.py | 6 +++++-

 1 file changed, 5 insertions(+), 1 deletion(-)
bin/forcebuild.py +0 -0
index 5fe61a0..e6770a4 100755
@@ -108,7 +108,11 @@ class YoctoAutobuilderAPI(object):
                      % (builder, state))

             return 1

-        opts = eval(opts) # FIXME: transform string argument into dictionary, security?
+        if opts:
+            # FIXME: transform string argument into dictionary, security?
+            opts = eval(opts)
+        else:
+            opts = {}
         current_opts = self._get_options_by_builder(builder) for opt in opts:
             if not opt in current_opts:
--
2.7.4