do_kernel_configcheck utilizes pathnames relative to the sourcedir
but does not specify ${S} in [dirs]. tasks that do not specify
[dirs] default to the cwd of the bitbake parent process. This can be
seen by inspection of exec_func/exec_func_python of
bitbake/lib/bb/build.py or by placing a "print('CWD', os.getcwd())"
at the head of do_kernel_configcheck.

This is problematic if bitbake is run from a directory that
contains a meta/ subdirectory. In this case the code:

    kmeta = d.getVar("KMETA") or "meta"
    if not os.path.exists(kmeta):
        kmeta = subprocess.check_output(['kgit', '--meta'], 
cwd=d.getVar('S')).decode('utf-8').rstrip()

Causes kmeta to be set to just "meta" if a meta directory exists
in the cwd of the bitbake parent process, or to the output of
kgit --meta if it does not.

Signed-off-by: Russ Dill <[email protected]>
---
 meta/classes/kernel-yocto.bbclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/classes/kernel-yocto.bbclass 
b/meta/classes/kernel-yocto.bbclass
index 1d5a8cdf29..c787b2a122 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -620,6 +620,7 @@ python do_kernel_configcheck() {
     if warnings_detected and kmeta_audit_werror:
         bb.fatal( "configuration warnings detected, werror is set, promoting 
to fatal" )
 }
+do_kernel_configcheck[dirs] = "${S}"
 
 # Ensure that the branches (BSP and meta) are on the locations specified by
 # their SRCREV values. If they are NOT on the right commits, the branches
-- 
2.25.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#164716): 
https://lists.openembedded.org/g/openembedded-core/message/164716
Mute This Topic: https://lists.openembedded.org/mt/90587617/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to