All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] oeqa/selftest: Fix failure when configuration contains BBLAYERS:append
@ 2024-12-09 20:29 Oleksandr Hnatiuk
  2024-12-09 20:38 ` Oleksandr Hnatiuk
  0 siblings, 1 reply; 2+ messages in thread
From: Oleksandr Hnatiuk @ 2024-12-09 20:29 UTC (permalink / raw)
  To: openembedded-core

When used with `--newbuilddir` option, it replaces relative paths in
BBLAYERS variable with absolute paths by evaluating the final value of
the variable, converting paths and saving result by assignment
(`BBLAYERS =`) at the end of bblayers.conf.

This breaks tests when bblayers.conf contains BBLAYERS:append because
:append statements are evaluated after all assignments and we end up
with the appended layer added twice - first by evaluating final value
of the variable, then again by bitbake evaluating BBLAYERS:append.

The error is as follows:
AssertionError: Command 'bitbake  -e' returned non-zero exit status 1:
ERROR: Found duplicated BBFILE_COLLECTIONS 'layer-name', check bblayers.conf or layer.conf to fix it.

Signed-off-by: Oleksandr Hnatiuk <ohnatiuk@cisco.com>
---
 meta/lib/oeqa/selftest/context.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/lib/oeqa/selftest/context.py b/meta/lib/oeqa/selftest/context.py
index acc3b073bd11..5eb4cc44fd3c 100644
--- a/meta/lib/oeqa/selftest/context.py
+++ b/meta/lib/oeqa/selftest/context.py
@@ -114,6 +114,7 @@ class OESelftestTestContext(OETestContext):
                 bblayers_abspath = [os.path.abspath(path) for path in bblayers.split()]
                 with open("%s/conf/bblayers.conf" % newbuilddir, "a") as f:
                     newbblayers = "# new bblayers to be used by selftest in the new build dir '%s'\n" % newbuilddir
+                    newbblayers += 'unset BBLAYERS\n'
                     newbblayers += 'BBLAYERS = "%s"\n' % ' '.join(bblayers_abspath)
                     f.write(newbblayers)
 
-- 
2.35.6



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] oeqa/selftest: Fix failure when configuration contains BBLAYERS:append
  2024-12-09 20:29 [PATCH] oeqa/selftest: Fix failure when configuration contains BBLAYERS:append Oleksandr Hnatiuk
@ 2024-12-09 20:38 ` Oleksandr Hnatiuk
  0 siblings, 0 replies; 2+ messages in thread
From: Oleksandr Hnatiuk @ 2024-12-09 20:38 UTC (permalink / raw)
  To: openembedded-core

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

This has been previously discussed in: https://bugzilla.yoctoproject.org/show_bug.cgi?id=15679

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-12-09 20:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-09 20:29 [PATCH] oeqa/selftest: Fix failure when configuration contains BBLAYERS:append Oleksandr Hnatiuk
2024-12-09 20:38 ` Oleksandr Hnatiuk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.