[yocto-autobuilder-helper,1/2] utils: Add getconfiglistfilter() to return config based on regexpr

Submitted by aaron.chun.yew.chan@intel.com on March 24, 2020, 12:27 a.m. | Patch ID: 171244

Details

Message ID 20200324002710.13224-1-aaron.chun.yew.chan@intel.com
State New
Headers show

Commit Message

aaron.chun.yew.chan@intel.com March 24, 2020, 12:27 a.m.
From: Aaron Chan <aaron.chun.yew.chan@intel.com>

Signed-off-by: Aaron Chan <aaron.chun.yew.chan@intel.com>
---
 scripts/utils.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

Patch hide | download patch | download mbox

diff --git a/scripts/utils.py b/scripts/utils.py
index 68652d9..204360d 100644
--- a/scripts/utils.py
+++ b/scripts/utils.py
@@ -119,6 +119,16 @@  def getconfiglistfilter(name, config, target, stepnum):
         merge(ret, config['defaults'][name])
     return expandresult(ret, config)
 
+# Return a list of configuration keys based on regular expressions
+def getconfigexpr(name, config, target, stepnum):
+    ret = []
+    step = "step" + str(stepnum)
+    if target in config['overrides'] and step in config['overrides'][target]:
+        for i in config['overrides'][target][step].keys():
+            if re.search(name, i):
+                ret.append(i)
+    return ret
+
 #
 # Expand 'templates' with the configuration
 #

Comments

aaron.chun.yew.chan@intel.com April 2, 2020, 2:28 a.m.
Could someone please review my patches ? Thanks.
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#49020): https://lists.yoctoproject.org/g/yocto/message/49020
Mute This Topic: https://lists.yoctoproject.org/mt/72507454/3617530
Group Owner: yocto+owner@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub  [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-