public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCH] opkg-keyrings: check if opkg-key exists before run postinst
@ 2020-05-07  3:24 Yi Zhao
  0 siblings, 0 replies; only message in thread
From: Yi Zhao @ 2020-05-07  3:24 UTC (permalink / raw)
  To: openembedded-core

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>
---
 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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-05-07  3:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-07  3:24 [PATCH] opkg-keyrings: check if opkg-key exists before run postinst Yi Zhao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox