Message ID | 1737687019-22232-1-git-send-email-mark.hatle@kernel.crashing.org |
---|---|
State | New |
Headers | show |
Series | [1/2] runqueue: add 'default' mc translation to mcdepends | expand |
On Thu, 2025-01-23 at 20:50 -0600, Mark Hatle via lists.openembedded.org wrote: > 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> I'm wondering if we should remove "default" entirely, it is confusing and I'm not sure we want to complicate the code with this. I'm going to test a patch doing that. Cheers, Richard
On Fri Jan 24, 2025 at 3:50 AM CET, Mark Hatle wrote: > 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> > --- Hi Mark, Thanks for your patch. I believe one of the patch from this series is responsible for some failures we can see on the autobuilder: FAIL: test_multiconfig_mcdepends (bb.tests.runqueue.RunQueueTests.test_multiconfig_mcdepends) ---------------------------------------------------------------------- Traceback (most recent call last): File "/srv/pokybuild/yocto-worker/oe-selftest-debian/build/bitbake/lib/bb/tests/runqueue.py", line 41, in run_bitbakecmd output = subprocess.check_output(cmd, env=env, stderr=subprocess.STDOUT,universal_newlines=True, cwd=builddir) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/subprocess.py", line 466, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/subprocess.py", line 571, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['bitbake', 'g1']' returned non-zero exit status 1. https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/846/steps/11/logs/stdio
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):