]> code.ossystems Code Review - openembedded-core.git/commitdiff
opkg-keyrings: check if opkg-key exists before run postinst
authorYi Zhao <yi.zhao@windriver.com>
Thu, 7 May 2020 03:24:32 +0000 (11:24 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 9 May 2020 17:55:43 +0000 (18:55 +0100)
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.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/opkg/opkg-keyrings_1.0.bb

index a20e316a3d1e8b67b08a5647149efe28ce75f013..07e24025456b5bfb7cc3f803712c95b4080d5332 100644 (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
 }