opkg-keyrings: check if opkg-key exists before run postinst

By default, the opkg-key command is not included in pokg package because
it is only installed when gpg support is enabled. We'd better check if
it exists before run 'opkg-key populate' in pkg_postinst.

(From OE-Core rev: 096a03659cdfa99ca2b4b50ff37d6f2001d0bc90)

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Yi Zhao
2020-05-07 11:24:32 +08:00
committed by Richard Purdie
parent 86b5247348
commit d15a8d87b6

View File

@@ -36,5 +36,8 @@ FILES_${PN} = "${datadir}/opkg/keyrings"
RDEPENDS_${PN} = "opkg"
pkg_postinst_ontarget_${PN} () {
opkg-key populate
if test -x ${bindir}/opkg-key
then
${bindir}/opkg-key populate
fi
}