Skip to contentSkip to conversation

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

PATCH New Yi Zhao 1 participant 1 message May 7, 2020

lore
Share & tools
lore

Yi Zhao

author
#0 lore raw

PATCH 1/1 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.

---
 meta/recipes-devtools/opkg/opkg-keyrings_1.0.bb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
meta/recipes-devtools/opkg/opkg-keyrings_1.0.bb +4 -1
index a20e316a3d..07e2402545 100644
@@ -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
 }
Signature · 1 line
2.17.1