[rtems-source-builder commit] sb/config: Fix os and arch conditional logic.

Chris Johns chrisj at rtems.org
Fri May 10 02:44:42 UTC 2019


Module:    rtems-source-builder
Branch:    master
Commit:    0956a2c089faf2600047577bb153afcaaba22288
Changeset: http://git.rtems.org/rtems-source-builder/commit/?id=0956a2c089faf2600047577bb153afcaaba22288

Author:    Chris Johns <chrisj at rtems.org>
Date:      Tue May  7 09:13:12 2019 +1000

sb/config: Fix os and arch conditional logic.

Correctly split the argument list and check each element.

Closes #3743

---

 source-builder/sb/config.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/source-builder/sb/config.py b/source-builder/sb/config.py
index b7bf403..df81d42 100644
--- a/source-builder/sb/config.py
+++ b/source-builder/sb/config.py
@@ -959,7 +959,8 @@ class file:
         isos = False
         if isvalid:
             os = self.define('_os')
-            for l in ls:
+            ls = ' '.join(ls).split()
+            for l in ls[1:]:
                 if l in os:
                     isos = True
                     break
@@ -969,7 +970,8 @@ class file:
         isnos = True
         if isvalid:
             os = self.define('_os')
-            for l in ls:
+            ls = ' '.join(ls).split()
+            for l in ls[1:]:
                 if l in os:
                     isnos = False
                     break
@@ -979,7 +981,8 @@ class file:
         isarch = False
         if isvalid:
             arch = self.define('_arch')
-            for l in ls:
+            ls = ' '.join(ls).split()
+            for l in ls[1:]:
                 if l in arch:
                     isarch = True
                     break



More information about the vc mailing list