Bug 16367 - Scarthgap: update_crates fails with non-crates.io dependencies
Summary: Scarthgap: update_crates fails with non-crates.io dependencies
Status: NEW
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 5.0.22
Hardware: x86 Multiple
: Medium normal
Target Milestone: 5.0.22
Assignee: Yoann Congal
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2026-07-20 23:39 UTC by Gyorgy Sarvari
Modified: 2026-07-23 14:39 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gyorgy Sarvari 2026-07-20 23:39:56 UTC
In case a Cargo.lock file has packages that are not present in crates.io, the update_crates task fails with Scarthgap. One example crate is cbindgen (after updating to version 0.29.4: https://git.openembedded.org/meta-openembedded/tree/meta-oe/recipes-devtools/cbindgen/cbindgen_0.29.2.bb)

The issue is present in oe-core, and separately also in meta-lts-mixins (scarthgap/rust branch).

The following commit fixes it: https://git.openembedded.org/openembedded-core/commit/meta/classes-recipe/cargo-update-recipe-crates.bbclass?id=1ef39b3fa731fb121d338aea2b1ac004620063e0


Error:

```
ERROR: cbindgen-0.29.4-r0 do_update_crates: ExecutionError('/yocto/scarthgap/build/tmp/work/cortexa57-poky-linux/cbindgen/0.29.4/temp/run.do_update_crates.3587093', 1, None, None)
ERROR: Logfile of failure stored in: /yocto/scarthgap/build/tmp/work/cortexa57-poky-linux/cbindgen/0.29.4/temp/log.do_update_crates.3587093
Log data follows:
| DEBUG: Executing python function extend_recipe_sysroot
| NOTE: Direct dependencies are ['/yocto/scarthgap/build/../poky/meta/recipes-devtools/quilt/quilt-native_0.67.bb:do_populate_sysroot', 'virtual:native:/yocto/scarthgap/build/../poky/meta/recipes-devtools/patch/patch_2.7.6.bb:do_populate_sysroot', 'virtual:native:/yocto/scarthgap/build/../poky/meta/recipes-devtools/python/python3_3.12.13.bb:do_populate_sysroot']
| NOTE: Installed into sysroot: ['cmake-native', 'openssl-native', 'expat-native', 'ncurses-native', 'util-linux-libuuid-native', 'zlib-native', 'libedit-native', 'make-native', 'perl-native', 'python3-native', 'bzip2-native', 'libnsl2-native', 'libtirpc-native', 'xz-native', 'zstd-native', 'gdbm-native', 'libffi-native', 'sqlite3-native']
| NOTE: Skipping as already exists in sysroot: ['gettext-minimal-native', 'libtool-native', 'quilt-native', 'texinfo-dummy-native', 'patch-native', 'attr-native']
| DEBUG: sed -e 's:^[^/]*/:/yocto/scarthgap/build/tmp/work/cortexa57-poky-linux/cbindgen/0.29.4/recipe-sysroot-native/:g' /yocto/scarthgap/build/tmp/sysroots-components/x86_64/openssl-native/fixmepath /yocto/scarthgap/build/tmp/sysroots-components/x86_64/ncurses-native/fixmepath /yocto/scarthgap/build/tmp/sysroots-components/x86_64/perl-native/fixmepath /yocto/scarthgap/build/tmp/sysroots-components/x86_64/python3-native/fixmepath | xargs sed -i -e 's:FIXMESTAGINGDIRTARGET:/yocto/scarthgap/build/tmp/work/cortexa57-poky-linux/cbindgen/0.29.4/recipe-sysroot:g; s:FIXMESTAGINGDIRHOST:/yocto/scarthgap/build/tmp/work/cortexa57-poky-linux/cbindgen/0.29.4/recipe-sysroot-native:g' -e 's:FIXME_PSEUDO_SYSROOT:/yocto/scarthgap/build/tmp/sysroots-components/x86_64/pseudo-native:g' -e 's:FIXME_HOSTTOOLS_DIR:/yocto/scarthgap/build/tmp/hosttools:g' -e 's:FIXME_PKGDATA_DIR:/yocto/scarthgap/build/tmp/pkgdata/qemuarm64:g' -e 's:FIXME_PSEUDO_LOCALSTATEDIR:/yocto/scarthgap/build/tmp/work/cortexa57-poky-linux/cbindgen/0.29.4/pseudo/:g' -e 's:FIXME_LOGFIFO:/yocto/scarthgap/build/tmp/work/cortexa57-poky-linux/cbindgen/0.29.4/temp/fifo.3587093:g'
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function do_update_crates
| Traceback (most recent call last):
|   File "<stdin>", line 41, in <module>
|   File "<stdin>", line 12, in get_crates
| ValueError: Unable to find any candidate crates that use crates.io
| 
| The above exception was the direct cause of the following exception:
| 
| Traceback (most recent call last):
|   File "<stdin>", line 43, in <module>
| ValueError: Cannot parse '/yocto/scarthgap/build/tmp/work/cortexa57-poky-linux/cbindgen/0.29.4/git/tests/rust/workspace/Cargo.lock'
| WARNING: exit code 1 from a shell command.
```