* [PATCH v2] bitbake: Don't treat mc recipe (Midnight Commander) as a multiconfig target
@ 2021-01-28 17:23 Tomasz Dziendzielski
2021-01-30 8:58 ` [OE-core] " Richard Purdie
0 siblings, 1 reply; 4+ messages in thread
From: Tomasz Dziendzielski @ 2021-01-28 17:23 UTC (permalink / raw)
To: openembedded-core; +Cc: Tomasz Dziendzielski
When we run `devtool build mc` recipe's task dependencies are expanded
to "mc:do_populate_sysroot" where "mc" name is treated as multiconfig
and "do_package_sysroot" as multiconfigname.
| ERROR: Multiconfig dependency mc:do_populate_sysroot depends on
| nonexistent multiconfig configuration named do_populate_sysroot
Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com>
--- skipped change in showEnvironment() to keep "bitbake -e" working
---
bitbake/lib/bb/cache.py | 4 ++--
bitbake/lib/bb/cooker.py | 4 ++--
bitbake/lib/bb/runqueue.py | 6 +++---
bitbake/lib/bb/siggen.py | 2 +-
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py
index 36270d0093..5497da384f 100644
--- a/bitbake/lib/bb/cache.py
+++ b/bitbake/lib/bb/cache.py
@@ -238,7 +238,7 @@ def virtualfn2realfn(virtualfn):
Convert a virtual file name to a real one + the associated subclass keyword
"""
mc = ""
- if virtualfn.startswith('mc:'):
+ if virtualfn.startswith('mc:') and virtualfn.count(':') == 2:
elems = virtualfn.split(':')
mc = elems[1]
virtualfn = ":".join(elems[2:])
@@ -268,7 +268,7 @@ def variant2virtual(realfn, variant):
"""
if variant == "":
return realfn
- if variant.startswith("mc:"):
+ if variant.startswith("mc:") and variant.count(':') == 2:
elems = variant.split(":")
if elems[2]:
return "mc:" + elems[1] + ":virtual:" + ":".join(elems[2:]) + ":" + realfn
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 83cfee7fb4..c200127b27 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -614,7 +614,7 @@ class BBCooker:
# Replace string such as "mc:*:bash"
# into "mc:A:bash mc:B:bash bash"
for k in targetlist:
- if k.startswith("mc:"):
+ if k.startswith("mc:") and k.count(':') == 2:
if wildcard:
bb.fatal('multiconfig conflict')
if k.split(":")[1] == "*":
@@ -648,7 +648,7 @@ class BBCooker:
for k in fulltargetlist:
origk = k
mc = ""
- if k.startswith("mc:"):
+ if k.startswith("mc:") and k.count(':') == 2:
mc = k.split(":")[1]
k = ":".join(k.split(":")[2:])
ktask = task
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 28bdadb45e..d1fcb7cea4 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -38,7 +38,7 @@ def taskname_from_tid(tid):
return tid.rsplit(":", 1)[1]
def mc_from_tid(tid):
- if tid.startswith('mc:'):
+ if tid.startswith('mc:') and tid.count(':') == 2:
return tid.split(':')[1]
return ""
@@ -47,13 +47,13 @@ def split_tid(tid):
return (mc, fn, taskname)
def split_mc(n):
- if n.startswith("mc:"):
+ if n.startswith("mc:") and n.count(':') == 2:
_, mc, n = n.split(":", 2)
return (mc, n)
return ('', n)
def split_tid_mcfn(tid):
- if tid.startswith('mc:'):
+ if tid.startswith('mc:') and tid.count(':') == 2:
elems = tid.split(':')
mc = elems[1]
fn = ":".join(elems[2:-1])
diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py
index 0ac3952466..6859a7207b 100644
--- a/bitbake/lib/bb/siggen.py
+++ b/bitbake/lib/bb/siggen.py
@@ -748,7 +748,7 @@ def clean_basepath(basepath):
if basepath[0] == '/':
return cleaned
- if basepath.startswith("mc:"):
+ if basepath.startswith("mc:") and basepath.count(':') == 2:
mc, mc_name, basepath = basepath.split(":", 2)
mc_suffix = ':mc:' + mc_name
else:
--
2.30.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [OE-core] [PATCH v2] bitbake: Don't treat mc recipe (Midnight Commander) as a multiconfig target
2021-01-28 17:23 [PATCH v2] bitbake: Don't treat mc recipe (Midnight Commander) as a multiconfig target Tomasz Dziendzielski
@ 2021-01-30 8:58 ` Richard Purdie
2021-01-30 11:52 ` Tomasz Dziendzielski
[not found] ` <165F0294B6476D79.25477@lists.openembedded.org>
0 siblings, 2 replies; 4+ messages in thread
From: Richard Purdie @ 2021-01-30 8:58 UTC (permalink / raw)
To: Tomasz Dziendzielski, openembedded-core; +Cc: Jon Mason
On Thu, 2021-01-28 at 18:23 +0100, Tomasz Dziendzielski wrote:
> When we run `devtool build mc` recipe's task dependencies are expanded
> to "mc:do_populate_sysroot" where "mc" name is treated as multiconfig
> and "do_package_sysroot" as multiconfigname.
>
> > ERROR: Multiconfig dependency mc:do_populate_sysroot depends on
> > nonexistent multiconfig configuration named do_populate_sysroot
>
> Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com>
>
> --- skipped change in showEnvironment() to keep "bitbake -e" working
> ---
bitbake patches need to go to the bitbake-devel list.
I did put this into testing anyway and it triggered errors in several
selftests:
bitbake-selftest:
https://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/1792/steps/11/logs/stdio
and oe-selftest:
https://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/1792/steps/14/logs/stdio
(these occurred in all the selftest builds but I've just linked to one).
Cheers,
Richard
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [OE-core] [PATCH v2] bitbake: Don't treat mc recipe (Midnight Commander) as a multiconfig target
2021-01-30 8:58 ` [OE-core] " Richard Purdie
@ 2021-01-30 11:52 ` Tomasz Dziendzielski
[not found] ` <165F0294B6476D79.25477@lists.openembedded.org>
1 sibling, 0 replies; 4+ messages in thread
From: Tomasz Dziendzielski @ 2021-01-30 11:52 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core, Jon Mason
[-- Attachment #1: Type: text/plain, Size: 1040 bytes --]
>bitbake patches need to go to the bitbake-devel list.
>
>I did put this into testing anyway and it triggered errors in several
selftests:
>
>bitbake-selftest:
>https
://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/1792/steps/11/logs/stdio
<https://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/1792/steps/11/logs/stdio>
>
>and oe-selftest:
>https
://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/1792/steps/14/logs/stdio
<https://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/1792/steps/14/logs/stdio>
>
>(these occurred in all the selftest builds but I've just linked to one).
It seems in these tests multiconfig targets can have more than 2 colons.
Probably changing "== 2" to ">= 2" should help.
I tried "bitbake-selftest" and with this change and it passed.
Unfortunately now I don't have access to machine that could handle all
oe-selftest. Could we agree that I will send second patch so it will be
tested on autobuider?
Best regards,
Tomasz Dziendzielski
[-- Attachment #2: Type: text/html, Size: 2352 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [OE-core] [PATCH v2] bitbake: Don't treat mc recipe (Midnight Commander) as a multiconfig target
[not found] ` <165F0294B6476D79.25477@lists.openembedded.org>
@ 2021-01-30 16:57 ` Tomasz Dziendzielski
0 siblings, 0 replies; 4+ messages in thread
From: Tomasz Dziendzielski @ 2021-01-30 16:57 UTC (permalink / raw)
To: Tomasz Dziendzielski; +Cc: Richard Purdie, openembedded-core, Jon Mason
[-- Attachment #1: Type: text/plain, Size: 1442 bytes --]
>>I did put this into testing anyway and it triggered errors in several
selftests:
>>
>>bitbake-selftest:
>>https
://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/1792/steps/11/logs/stdio
<https://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/1792/steps/11/logs/stdio>
>>
>>and oe-selftest:
>>https
://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/1792/steps/14/logs/stdio
<https://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/1792/steps/14/logs/stdio>
>>
>>(these occurred in all the selftest builds but I've just linked to one).
>It seems in these tests multiconfig targets can have more than 2 colons.
Probably changing "== 2" to ">= 2" should help.
>I tried "bitbake-selftest" and with this change and it passed.
Unfortunately now I don't have access to machine that could handle all
oe-selftest. Could we agree that I will send second patch so it will be
tested on autobuider?
Sorry, I misunderstood your words and thought some other than multiconfig
cases failed on other builds, while in fact it was just multiconfig
failures. Running "oe-selftest -a" would take ages on my machine. With the
">= 2" "bitbake-selftest" already passed and "oe-selftest -r multiconfig"
is correctly building things, instead of failing on "RunQueue" step. As
soon as the multiconfig tests pass I will submit a new patch to
bitbake-devel.
Best regards,
Tomasz Dziendzielsk
[-- Attachment #2: Type: text/html, Size: 2825 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-01-30 16:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-28 17:23 [PATCH v2] bitbake: Don't treat mc recipe (Midnight Commander) as a multiconfig target Tomasz Dziendzielski
2021-01-30 8:58 ` [OE-core] " Richard Purdie
2021-01-30 11:52 ` Tomasz Dziendzielski
[not found] ` <165F0294B6476D79.25477@lists.openembedded.org>
2021-01-30 16:57 ` Tomasz Dziendzielski
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.