[OE-core] [PATCH] ca-certificates: run postinst script only for -target package

Martin Jansa martin.jansa at gmail.com
Mon Mar 19 15:32:55 UTC 2018


Do you already have similar patch for nativesdk-shadow somewhere?

One thing I've noticed with new set -e is that you get only one failure per
run, which is expected.

Just when I had 8 different update-alternatives call failing in busybox
postinst (due to different defconfig we use) I would appreciate to see all
errors in one go. But I don't see how to "improve" this easily, running it
twice with and without "set -e" would probably cause more confusion than
helping with too many errors in one postinst.

It would be great if the output of postinst script could be extracted to
separate file or the warning provided some simple way to re-execute just
the failing postinst manually (e.g. with devtool). Currently I do it
manually, which I cannot recommend to anyone (basically removing rm_work
from INHERIT to keep rootfs after do_rootfs, then jumping to rootfs
directory, exporting D and running the postinst from OPKGLIBDIR).

Regards,

On Thu, Mar 15, 2018 at 12:27 PM, Alexander Kanavin <
alexander.kanavin at linux.intel.com> wrote:

> 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 at linux.intel.com>
> ---
>  meta/recipes-support/ca-certificates/ca-certificates_20170717.bb | 5
> +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-support/ca-certificates/ca-certificates_
> 20170717.bb b/meta/recipes-support/ca-certificates/ca-certificates_
> 20170717.bb
> index 52a1a07f68c..51af72e79a3 100644
> --- a/meta/recipes-support/ca-certificates/ca-certificates_20170717.bb
> +++ b/meta/recipes-support/ca-certificates/ca-certificates_20170717.bb
> @@ -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
> --
> 2.16.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20180319/950fd98a/attachment-0002.html>


More information about the Openembedded-core mailing list