]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
ca-certificates: fix on-target postinstall script
authorGyorgy Sarvari <skandigraun@gmail.com>
Fri, 23 May 2025 18:18:13 +0000 (20:18 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 25 May 2025 10:24:51 +0000 (11:24 +0100)
commitcf39461e97098a1b28693299677888ba7e8bfccf
tree558a2cb92c2762dbb402011167466e36d996fd7c
parentd6ef6c50dd344a8cfc873c18216ba497735d8200
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>
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-support/ca-certificates/ca-certificates_20250419.bb