From: Mark Hatle <mark.hatle@kernel.crashing.org>
To: bitbake-devel@lists.openembedded.org
Subject: [PATCH 1/2] runqueue: add 'default' mc translation to mcdepends
Date: Thu, 23 Jan 2025 20:50:18 -0600 [thread overview]
Message-ID: <1737687019-22232-1-git-send-email-mark.hatle@kernel.crashing.org> (raw)
From: Mark Hatle <mark.hatle@amd.com>
The default mc is '' (blank), however BB_CURRENT_MC returns 'default'.
Allow a user to specify a mcdepend such as:
mc:${BB_CURRENT_MC}:m2:recipe:task
Both '' (blank) and 'default' are now supported and have equivalent
meaning.
Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
---
bitbake/lib/bb/runqueue.py | 4 ++++
bitbake/lib/bb/tests/runqueue-tests/recipes/g1.bb | 2 ++
bitbake/lib/bb/tests/runqueue-tests/recipes/h1.bb | 0
bitbake/lib/bb/tests/runqueue-tests/recipes/i1.bb | 0
bitbake/lib/bb/tests/runqueue.py | 7 +++++++
5 files changed, 13 insertions(+)
create mode 100644 bitbake/lib/bb/tests/runqueue-tests/recipes/g1.bb
create mode 100644 bitbake/lib/bb/tests/runqueue-tests/recipes/h1.bb
create mode 100644 bitbake/lib/bb/tests/runqueue-tests/recipes/i1.bb
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index ffb2d28494..f941749b0d 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -723,7 +723,11 @@ class RunQueueData:
mcdependency = dep.split(':')
pn = mcdependency[3]
frommc = mcdependency[1]
+ if frommc == 'default':
+ frommc = ''
mcdep = mcdependency[2]
+ if mcdep == 'default':
+ mcdep = ''
deptask = mcdependency[4]
if mcdep not in taskData:
bb.fatal("Multiconfig '%s' is referenced in multiconfig dependency '%s' but not enabled in BBMULTICONFIG?" % (mcdep, dep))
diff --git a/bitbake/lib/bb/tests/runqueue-tests/recipes/g1.bb b/bitbake/lib/bb/tests/runqueue-tests/recipes/g1.bb
new file mode 100644
index 0000000000..20ce8dd3ad
--- /dev/null
+++ b/bitbake/lib/bb/tests/runqueue-tests/recipes/g1.bb
@@ -0,0 +1,2 @@
+do_build[mcdepends] = "mc::mc-1:h1:do_build mc:default:mc_2:i1:do_build"
+
diff --git a/bitbake/lib/bb/tests/runqueue-tests/recipes/h1.bb b/bitbake/lib/bb/tests/runqueue-tests/recipes/h1.bb
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/bitbake/lib/bb/tests/runqueue-tests/recipes/i1.bb b/bitbake/lib/bb/tests/runqueue-tests/recipes/i1.bb
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/bitbake/lib/bb/tests/runqueue.py b/bitbake/lib/bb/tests/runqueue.py
index cc87e8d6a8..cea2ca13fe 100644
--- a/bitbake/lib/bb/tests/runqueue.py
+++ b/bitbake/lib/bb/tests/runqueue.py
@@ -314,6 +314,13 @@ class RunQueueTests(unittest.TestCase):
["mc_2:a1:%s" % t for t in rerun_tasks]
self.assertEqual(set(tasks), set(expected))
+ # Test that mc::... and mc:default:... both work
+ tasks = self.run_bitbakecmd(["bitbake", "g1"], tempdir, "", extraenv=extraenv, cleanup=True)
+ expected = ["g1:%s" % t for t in self.alltasks] + \
+ ["mc-1:h1:%s" % t for t in self.alltasks] + \
+ ["mc_2:i1:%s" % t for t in self.alltasks]
+ self.assertEqual(set(tasks), set(expected))
+
self.shutdown(tempdir)
def test_hashserv_single(self):
--
2.34.1
next reply other threads:[~2025-01-24 2:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-24 2:50 Mark Hatle [this message]
2025-01-24 2:50 ` [PATCH 2/2] runqueue: Verify mcdepends are valid Mark Hatle
2025-01-25 9:04 ` [bitbake-devel] " Richard Purdie
2025-01-24 15:59 ` [bitbake-devel] [PATCH 1/2] runqueue: add 'default' mc translation to mcdepends Richard Purdie
2025-01-26 9:24 ` Mathieu Dubois-Briand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1737687019-22232-1-git-send-email-mark.hatle@kernel.crashing.org \
--to=mark.hatle@kernel.crashing.org \
--cc=bitbake-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.