diff options
| author | Gyorgy Sarvari <skandigraun@gmail.com> | 2025-05-23 20:18:13 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-05-27 09:01:16 +0100 |
| commit | 77b7006d7700e413ca363631fbd652fb88e46c20 (patch) | |
| tree | 0de42ac0bb4f526e4ad58a905d2e2bedd22f77fd | |
| parent | be020974d59722d68280b72db71c4c242f489770 (diff) | |
| download | poky-77b7006d7700e413ca363631fbd652fb88e46c20.tar.gz | |
ca-certificates: fix on-target postinstall script
When the package is installed directly on the machine (instead of
installing it in the rootfs directly), the postinstall script fails with
the following error:
/usr/sbin/update-ca-certificates: line 75: shift: shift count out of range
The reason is that the "update-ca-certificates" script is executed with
the "--sysroot" argument, and as the sysroot $D is passed. However on the
target system this variable doesn't exist, so the argument is passed without
this mandatory value, and the execution fails.
To avoid this error, check if the $D variable exists, and pass the --sysroot
argument only when it does.
Reported-by: WXbet <Wxbet@proton.me>
(From OE-Core rev: cf39461e97098a1b28693299677888ba7e8bfccf)
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-support/ca-certificates/ca-certificates_20250419.bb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/recipes-support/ca-certificates/ca-certificates_20250419.bb b/meta/recipes-support/ca-certificates/ca-certificates_20250419.bb index f06a30bd6d..01f594095e 100644 --- a/meta/recipes-support/ca-certificates/ca-certificates_20250419.bb +++ b/meta/recipes-support/ca-certificates/ca-certificates_20250419.bb | |||
| @@ -60,7 +60,8 @@ do_install:append:class-target () { | |||
| 60 | } | 60 | } |
| 61 | 61 | ||
| 62 | pkg_postinst:${PN}:class-target () { | 62 | pkg_postinst:${PN}:class-target () { |
| 63 | $D${sbindir}/update-ca-certificates --sysroot $D | 63 | [ -n "$D" ] && sysroot_args="--sysroot $D" |
| 64 | $D${sbindir}/update-ca-certificates $sysroot_args | ||
| 64 | } | 65 | } |
| 65 | 66 | ||
| 66 | CONFFILES:${PN} += "${sysconfdir}/ca-certificates.conf" | 67 | CONFFILES:${PN} += "${sysconfdir}/ca-certificates.conf" |
