Skip to contentSkip to conversation

layerindex/utils.py: Add to baseconfig=True for bb.parse.handle()

PATCH In review Robert Yang 2 participants 3 messages Dec 20, 2022 – Dec 21, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 layerindex/utils.py: Add to baseconfig=True for bb.parse.handle()

Bitbake's api has been changed via:
afb8478d3 parse: Add support for addpylib conf file directive and BB_GLOBAL_PYMODULES

The conf file won't be parsed without baseconfig=True:
bb.parse.ParseError: ParseError at /path/to/oe-core/meta/conf/layer.conf:132: unparsed line: 'addpylib ${LAYERDIR}/lib oe'

---
 layerindex/utils.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
layerindex/utils.py +4 -1
index 6566710..9d94015 100644
@@ -314,7 +314,10 @@ def is_branch_valid(layerdir, branch):
 def parse_conf(conf_file, d):
     if hasattr(bb.parse, "handle"):
         # Newer BitBake
-        data = bb.parse.handle(conf_file, d, include=True)
+        if hasattr(bb.parse.parse_py.ConfHandler, "__addpylib_regexp__"):
+            data = bb.parse.handle(conf_file, d, include=True, baseconfig=True)
+        else:
+            data = bb.parse.handle(conf_file, d, include=True)
     else:
         # Older BitBake (1.18 and below)
         data = bb.cooker._parse(conf_file, d)
Signature · 1 line
2.37.1
#1 lore raw
Quoted 30 lines · Robert Yang

Bitbake's api has been changed via:
afb8478d3 parse: Add support for addpylib conf file directive and BB_GLOBAL_PYMODULES

The conf file won't be parsed without baseconfig=True:
bb.parse.ParseError: ParseError at /path/to/oe-core/meta/conf/layer.conf:132: unparsed line: 'addpylib ${LAYERDIR}/lib oe'

Merged. Thank you!

---
<snip>
--
2.37.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#58837):
https://lists.yoctoproject.org/g/yocto/message/58837
Mute This Topic: https://lists.yoctoproject.org/mt/95781944/924729
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#2 lore raw
Quoted 8 lines · Tim Orling

On Mon, Dec 19, 2022 at 11:26 PM Robert Yang <[email protected] <mailto:[email protected]>> wrote:

Bitbake's api has been changed via:
afb8478d3 parse: Add support for addpylib conf file directive and BB_GLOBAL_PYMODULES

Quoted 6 lines

The conf file won't be parsed without baseconfig=True:
bb.parse.ParseError: ParseError at /path/to/oe-core/meta/conf/layer.conf:132: unparsed line: 'addpylib ${LAYERDIR}/lib oe'

Merged. Thank you!

Glad to see that layerindex is back to active.

I've also sent you another 3 patches just now:

utils.py: Prefer the one which matches branchname for depends layer recipeparse.py: Checkout deplayerbranch before parsing util.py: Fix for removing non-existed dependencies

I think that I had sent them before, but not get merged, layerindex may not work well without these fixes.

// Robert

Quoted 22 lines
    Signed-off-by: Robert Yang <[email protected]
    <mailto:[email protected]>>
    ---
    <snip>
    -- 
    2.37.1


    -=-=-=-=-=-=-=-=-=-=-=-
    Links: You receive all messages sent to this group.
    View/Reply Online (#58837):
    https://lists.yoctoproject.org/g/yocto/message/58837
    <https://urldefense.com/v3/__https://lists.yoctoproject.org/g/yocto/message/58837__;!!AjveYdw8EvQ!f82pFsZIjTXfpv3B6LSr7x_5u225kNcUYM4LAUVvBu-7OS0E-2XR9CWbMzZvGBQ8fAk7X9lL9YGOQelM8Imvyw$>
    Mute This Topic: https://lists.yoctoproject.org/mt/95781944/924729
    <https://urldefense.com/v3/__https://lists.yoctoproject.org/mt/95781944/924729__;!!AjveYdw8EvQ!f82pFsZIjTXfpv3B6LSr7x_5u225kNcUYM4LAUVvBu-7OS0E-2XR9CWbMzZvGBQ8fAk7X9lL9YGOQekkj_SwmA$>
    Group Owner: [email protected]
    <mailto:yocto%[email protected]>
    Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub
    <https://urldefense.com/v3/__https://lists.yoctoproject.org/g/yocto/unsub__;!!AjveYdw8EvQ!f82pFsZIjTXfpv3B6LSr7x_5u225kNcUYM4LAUVvBu-7OS0E-2XR9CWbMzZvGBQ8fAk7X9lL9YGOQekx9xA53A$> [[email protected] <mailto:[email protected]>]
    -=-=-=-=-=-=-=-=-=-=-=-