toaster.lists.yoctoproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] toaster: Filtering out erroneously empty bblayer names.
       [not found] <1842202097.376829.1622131828173.ref@mail.yahoo.com>
@ 2021-05-27 16:10 ` ilies bogdan
  0 siblings, 0 replies; only message in thread
From: ilies bogdan @ 2021-05-27 16:10 UTC (permalink / raw)
  To: toaster

[-- Attachment #1: Type: text/plain, Size: 1113 bytes --]

Within toaster.bbclass on toaster_layerinfo_dumpdata the str.strip is only applied to the value that comes from BBLAYERS. There are chances (also the case that I ran into by mistake) when there is an additional \t which will lead to trying to process a layer with name "\t". IMO this can be accepted and I have added an extra strip on layer name before filtering by empty layer name.

Signed-off-by: Bogdan Ilies <ene-ilies@users.noreply.github.com>
---
 meta/classes/toaster.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/classes/toaster.bbclass b/meta/classes/toaster.bbclass
index 9518ddf7a4e..066cebc066e 100644
--- a/meta/classes/toaster.bbclass
+++ b/meta/classes/toaster.bbclass
@@ -84,7 +84,8 @@ python toaster_layerinfo_dumpdata() {
 
     llayerinfo = {}
 
-    for layer in { l for l in bblayers.strip().split(" ") if len(l) }:
+    bblayers_list = [l for l in map(str.strip, bblayers.strip().split(" ")) if len(l)]
+    for layer in bblayers_list:
         llayerinfo[layer] = _get_layer_dict(layer)
 
 
-- 
2.25.1

[-- Attachment #2: Type: text/html, Size: 1494 bytes --]

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-27 16:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1842202097.376829.1622131828173.ref@mail.yahoo.com>
2021-05-27 16:10 ` [PATCH 1/1] toaster: Filtering out erroneously empty bblayer names ilies bogdan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).