poky/scripts/postinst-intercepts/update_mandb
Eilís 'pidge' Ní Fhlannagáin 81ef24bac0 update_mandb: deb fails due to missing man cache
This only occurs in debian package builds when populating the sdk
and is a work around that seems to work. Eventually we should look
at why this is failing (I have ideas, it's somewhere in
lib/oe/package_management/deb/sdk.py), but for now, do this so we can
fix the core issue with nativesdk-intercepts.

(From OE-Core rev: a411123a95114233c5efd762dbcc8eb513030aab)

Signed-off-by: Eilís 'pidge' Ní Fhlannagáin <pidge@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-17 19:37:19 +01:00

450 B

#!/bin/sh

SPDX-License-Identifier: MIT

set -eu

Create a temporary man_db.conf with paths to the rootfs, as mandb needs absolute paths

CONFIG=$(mktemp --tmpdir update-mandb.XXXXX) sed "s:(\s)/:\1$D/:g" $D${sysconfdir}/man_db.conf > $CONFIG

mkdir -p $D${localstatedir}/cache/man/

PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${bindir}/mandb --config-file $CONFIG --create

rm -f $CONFIG

chown -R man:man $D${localstatedir}/cache/man/