mbox series

[0/1] bitbake --skip-deps feature

Message ID 20251230091530.2373504-1-adrian.freihofer@siemens.com
Headers show
Series bitbake --skip-deps feature | expand

Message

AdrianF Dec. 30, 2025, 9:15 a.m. UTC
From: Adrian Freihofer <adrian.freihofer@siemens.com>

Adds a "skip-deps" feature to run/build specific tasks without scheduling their
full dependency tree.

This is useful for devtool ide-sdk, which works like this:
- The IDE's native build system is used to build the code.
- bitbake my-recipe:do_install --skip-deps --force is run to install the built
  artifacts.
- A script based on devtool deploy-target is used to deploy the installed
  artifacts to the target device.
- The IDE's debugging features are used to debug the code on the target device.

One more commit to openembedded-core is needed to fully support this feature.
This is already prepared and tested. Branch is here:
https://git.openembedded.org/openembedded-core-contrib/log/?h=adrianf/ide-sdk-improvements

Adrian Freihofer (1):
  tests/runqueue: cover --skip-deps

 lib/bb/tests/runqueue.py | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Mathieu Dubois-Briand Dec. 30, 2025, 3:14 p.m. UTC | #1
On Tue Dec 30, 2025 at 10:15 AM CET, Adrian Freihofer via lists.openembedded.org wrote:
> From: Adrian Freihofer <adrian.freihofer@siemens.com>
>
> Adds a "skip-deps" feature to run/build specific tasks without scheduling their
> full dependency tree.
>
> This is useful for devtool ide-sdk, which works like this:
> - The IDE's native build system is used to build the code.
> - bitbake my-recipe:do_install --skip-deps --force is run to install the built
>   artifacts.
> - A script based on devtool deploy-target is used to deploy the installed
>   artifacts to the target device.
> - The IDE's debugging features are used to debug the code on the target device.
>
> One more commit to openembedded-core is needed to fully support this feature.
> This is already prepared and tested. Branch is here:
> https://git.openembedded.org/openembedded-core-contrib/log/?h=adrianf/ide-sdk-improvements
>
> Adrian Freihofer (1):
>   tests/runqueue: cover --skip-deps
>
>  lib/bb/tests/runqueue.py | 9 +++++++++
>  1 file changed, 9 insertions(+)

Hi Adrian,

Thanks for your patch. Is the bitbake series complete? I can see a patch
adding tests, but none adding the feature. Am I missing something?

So far, the test is failing on the autobuilder:

FAIL: test_skip_deps (bb.tests.runqueue.RunQueueTests.test_skip_deps)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/srv/pokybuild/yocto-worker/oe-selftest-fedora/build/layers/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/lib64/python3.12/subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['bitbake', 'a1', '-c', 'install', '--skip-deps']' returned non-zero exit status 2.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/pokybuild/yocto-worker/oe-selftest-fedora/build/layers/bitbake/lib/bb/tests/runqueue.py", line 409, in test_skip_deps
    tasks = self.run_bitbakecmd(cmd, tempdir)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/pokybuild/yocto-worker/oe-selftest-fedora/build/layers/bitbake/lib/bb/tests/runqueue.py", line 46, in run_bitbakecmd
    self.fail("Command %s failed with %s" % (cmd, e.output))
AssertionError: Command ['bitbake', 'a1', '-c', 'install', '--skip-deps'] failed with usage: bitbake [-s] [-e] [-g] [-u UI] [--version] [-h] [-f] [-c CMD]
               [-C INVALIDATE_STAMP] [--runall RUNALL] [--runonly RUNONLY]
               [--no-setscene] [--skip-setscene] [--setscene-only] [-n] [-p]
               [-k] [-P PROFILE] [-S SIGNATURE_HANDLER] [--revisions-changed]
               [-b BUILDFILE] [-D] [-l DEBUG_DOMAINS] [-v] [-q]
               [-w WRITEEVENTLOG] [-B BIND] [-T SERVER_TIMEOUT]
               [--remote-server REMOTE_SERVER] [-m] [--token XMLRPCTOKEN]
               [--observe-only] [--status-only] [--server-only] [-r PREFILE]
               [-R POSTFILE] [-I EXTRA_ASSUME_PROVIDED]
               [recipename/target ...]
bitbake: error: unrecognized arguments: --skip-deps

https://autobuilder.yoctoproject.org/valkyrie/#/builders/48/builds/2823
https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3068
https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/2930

Thanks,
Mathieu