From: Yi Zhao <[email protected]>

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 <[email protected]>
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Steve Sakoman <[email protected]>
---
 meta/recipes-devtools/opkg/opkg-keyrings_1.0.bb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/opkg/opkg-keyrings_1.0.bb 
b/meta/recipes-devtools/opkg/opkg-keyrings_1.0.bb
index a20e316a3d..07e2402545 100644
--- a/meta/recipes-devtools/opkg/opkg-keyrings_1.0.bb
+++ b/meta/recipes-devtools/opkg/opkg-keyrings_1.0.bb
@@ -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
 }
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#138420): 
https://lists.openembedded.org/g/openembedded-core/message/138420
Mute This Topic: https://lists.openembedded.org/mt/74295762/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to