]> code.ossystems Code Review - openembedded-core.git/commitdiff
ca-certificates: run postinst script only for -target package
authorAlexander Kanavin <alexander.kanavin@linux.intel.com>
Thu, 15 Mar 2018 11:27:06 +0000 (13:27 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 19 Mar 2018 23:05:01 +0000 (23:05 +0000)
Nativesdk package has a special arrangement where the same thing is done
in do_install(). It was assumed (in the comment) that postinsts don't run when
installing nativesdk packages, but this was incorrect: they are run, but
any failures were previously silently ignored. Now this missing failure reporting has
been fixed, and so we get to see the failures.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-support/ca-certificates/ca-certificates_20170717.bb

index 52a1a07f68c114e0bcd279ada6a53b944a970773..51af72e79a3dc25cf3a7eb2fb668beabf0d797c5 100644 (file)
@@ -64,13 +64,14 @@ do_install_append_class-target () {
         ${D}${mandir}/man8/update-ca-certificates.8
 }
 
-pkg_postinst_${PN} () {
+pkg_postinst_${PN}_class-target () {
     SYSROOT="$D" $D${sbindir}/update-ca-certificates
 }
 
 CONFFILES_${PN} += "${sysconfdir}/ca-certificates.conf"
 
-# Postinsts don't seem to be run for nativesdk packages when populating SDKs.
+# Rather than make a postinst script that works for both target and nativesdk,
+# we just run update-ca-certificate from do_install() for nativesdk.
 CONFFILES_${PN}_append_class-nativesdk = " ${sysconfdir}/ssl/certs/ca-certificates.crt"
 do_install_append_class-nativesdk () {
     SYSROOT="${D}${SDKPATHNATIVE}" ${D}${sbindir}/update-ca-certificates