Small patch for toaster.bbclass
"ilies bogdan" <[email protected]>
| Newsgroups | org.yoctoproject.lists.toaster |
|---|---|
| Message-ID | <[email protected]> |
Hello guys, My name is Bogdan Ilies and while using toaster for a bobby project I ran into a small issue with toaster. Attached I am providing my proposed patch. If you think this is an appropriate fix could you please help me get it merged into poky or help me with write access to poky-contrib so that I can propose the patch in there? The patch is about having a special character like "\t" within the value of BBLAYERS which would lead to trying to consider a layer with name "\t" because during splitting only the value from BBLAYERS is stripped and not also the value for layer after split. Thank you very much for your time. A great weekend to you all,Bogdan Ilies
0001-toaster-Filtering-out-erroneously-empty-bblayer-name.patch
(application/octet-stream, 1.3 KB)
From 390685e498e3e52164472c8112c01f45c2040e42 Mon Sep 17 00:00:00 2001 From: Bogdan Ilies <[email protected]> Date: Thu, 20 May 2021 17:24:00 +0200 Subject: [PATCH] toaster: Filtering out erroneously empty bblayer names. 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 <[email protected]> --- 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 9518ddf7a4..066cebc066 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