Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Sinan Kaya <Okaya@kernel.org>
To: Alexander Kanavin <alex.kanavin@gmail.com>,
	ChenQi <Qi.Chen@windriver.com>
Cc: OE-core <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH v1] postinst-intercepts: check tool presence in intercept hooks
Date: Wed, 26 Jun 2019 13:33:57 -0400	[thread overview]
Message-ID: <5647f634-725a-fd9e-3b13-369095f4d415@kernel.org> (raw)
In-Reply-To: <CANNYZj_r7wXtZy2he3y_n5cCXagpWsc+nyheGATHYq3k-dUYvQ@mail.gmail.com>

Here is my investigation:

The intercepts are executed on QEMU during cross-compilation using
qemu-wrapper.

I see that the tools were built for the native architecture but
of course they do not exist on the target image and I have no
interest in pulling fonts and such into my image to make bitbake
happy.

DEBUG: Collected intercepts:
  poky/scripts/postinst-intercepts/update_font_cache
  poky/scripts/postinst-intercepts/update_gio_module_cache
  poky/scripts/postinst-intercepts/update_gtk_immodules_cache
  poky/scripts/postinst-intercepts/update_icon_cache
  poky/scripts/postinst-intercepts/update_pixbuf_cache
  poky/scripts/postinst-intercepts/update_udev_hwdb

I also see that other intercepts are doing the same folder/executable
checks.

What is so special about these?


On 6/26/2019 4:59 AM, Alexander Kanavin wrote:
> Yes, this looks suspicious to me as well. If the tools are absent you
> need to investigate why they are absent; skipping the tools execution is
> just sweeping the problem under the carpet, not fixing it.
> 
> Alex
> 
> On Wed, 26 Jun 2019 at 04:15, ChenQi <Qi.Chen@windriver.com
> <mailto:Qi.Chen@windriver.com>> wrote:
> 
>     Under which circumstances will the tools be absent?
>     And why do you check the existence of files for some the the existence
>     of directories for others?
> 
>     Best Regards,
>     Chen Qi
> 
>     On 06/26/2019 06:13 AM, Sinan Kaya wrote:
>     > do_rootfs: The postinstall intercept hook 'update_udev_hwdb'
>     > do_rootfs: The postinstall intercept hook
>     'update_gio_module_cache' failed
>     > do_rootfs: The postinstall intercept hook 'update_icon_cache' failed
>     > do_rootfs: The postinstall intercept hook 'update_icon_cache' failed
>     >
>     > Signed-off-by: Sinan Kaya <okaya@kernel.org <mailto:okaya@kernel.org>>
>     > ---
>     >   scripts/postinst-intercepts/update_font_cache    |  6 ++++--
>     >   .../postinst-intercepts/update_gio_module_cache  | 10 +++++++---
>     >   scripts/postinst-intercepts/update_icon_cache    | 16
>     +++++++++-------
>     >   scripts/postinst-intercepts/update_pixbuf_cache  |  5 ++++-
>     >   scripts/postinst-intercepts/update_udev_hwdb     |  6 ++++--
>     >   5 files changed, 28 insertions(+), 15 deletions(-)
>     >
>     > diff --git a/scripts/postinst-intercepts/update_font_cache
>     b/scripts/postinst-intercepts/update_font_cache
>     > index 3053c7065f4..954acbb41b2 100644
>     > --- a/scripts/postinst-intercepts/update_font_cache
>     > +++ b/scripts/postinst-intercepts/update_font_cache
>     > @@ -5,5 +5,7 @@
>     >   
>     >   set -e
>     >   
>     > -PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D -E
>     ${fontconfigcacheenv} $D${libexecdir}/${binprefix}fc-cache
>     --sysroot=$D --system-only ${fontconfigcacheparams}
>     > -chown -R root:root $D${fontconfigcachedir}
>     > +if [ -f $D${libexecdir}/${binprefix}fc-cache ]; then
>     > +     PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D -E
>     ${fontconfigcacheenv} $D${libexecdir}/${binprefix}fc-cache
>     --sysroot=$D --system-only ${fontconfigcacheparams}
>     > +     chown -R root:root $D${fontconfigcachedir}
>     > +fi
>     > diff --git a/scripts/postinst-intercepts/update_gio_module_cache
>     b/scripts/postinst-intercepts/update_gio_module_cache
>     > index c87fa85db9e..e8483cb0bf5 100644
>     > --- a/scripts/postinst-intercepts/update_gio_module_cache
>     > +++ b/scripts/postinst-intercepts/update_gio_module_cache
>     > @@ -5,7 +5,11 @@
>     >   
>     >   set -e
>     >   
>     > -PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D
>     $D${libexecdir}/${binprefix}gio-querymodules $D${libdir}/gio/modules/
>     > +if [ -f $D${libexecdir}/${binprefix}gio-querymodules ]; then
>     > +
>     > +     PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D
>     $D${libexecdir}/${binprefix}gio-querymodules $D${libdir}/gio/modules/
>     > +
>     > +     [ ! -e $D${libdir}/gio/modules/giomodule.cache ] ||
>     > +             chown root:root $D${libdir}/gio/modules/giomodule.cache
>     > +fi
>     >   
>     > -[ ! -e $D${libdir}/gio/modules/giomodule.cache ] ||
>     > -     chown root:root $D${libdir}/gio/modules/giomodule.cache
>     > diff --git a/scripts/postinst-intercepts/update_icon_cache
>     b/scripts/postinst-intercepts/update_icon_cache
>     > index 212209a9daf..a67ff7ef970 100644
>     > --- a/scripts/postinst-intercepts/update_icon_cache
>     > +++ b/scripts/postinst-intercepts/update_icon_cache
>     > @@ -5,12 +5,14 @@
>     >   
>     >   set -e
>     >   
>     > -# update native pixbuf loaders
>     >
>     -$STAGING_DIR_NATIVE/${libdir_native}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders
>     --update-cache
>     > +if [ -d $STAGING_DIR_NATIVE/${libdir_native}/gdk-pixbuf-2.0 ]; then
>     > +     # update native pixbuf loaders
>     > +   
>      $STAGING_DIR_NATIVE/${libdir_native}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders
>     --update-cache
>     >   
>     > -for icondir in $D/usr/share/icons/*/ ; do
>     > -    if [ -d $icondir ] ; then
>     > -        gtk-update-icon-cache -fqt  $icondir
>     > -    fi
>     > -done
>     > +     for icondir in $D/usr/share/icons/*/ ; do
>     > +         if [ -d $icondir ] ; then
>     > +             gtk-update-icon-cache -fqt  $icondir
>     > +         fi
>     > +     done
>     > +fi
>     >   
>     > diff --git a/scripts/postinst-intercepts/update_pixbuf_cache
>     b/scripts/postinst-intercepts/update_pixbuf_cache
>     > index ea12814474e..166422e5c37 100644
>     > --- a/scripts/postinst-intercepts/update_pixbuf_cache
>     > +++ b/scripts/postinst-intercepts/update_pixbuf_cache
>     > @@ -8,6 +8,9 @@ set -e
>     >   export
>     GDK_PIXBUF_MODULEDIR=$D${libdir}/gdk-pixbuf-2.0/2.10.0/loaders
>     >   export GDK_PIXBUF_FATAL_LOADER=1
>     >   
>     > -PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D
>     $D${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders \
>     > +if [ -d $D${libdir}/gdk-pixbuf-2.0 ]; then
>     > +     PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D
>     $D${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders \
>     >       >$GDK_PIXBUF_MODULEDIR/../loaders.cache && \
>     >       sed -i -e "s:$D::g" $GDK_PIXBUF_MODULEDIR/../loaders.cache
>     > +fi
>     > +
>     > diff --git a/scripts/postinst-intercepts/update_udev_hwdb
>     b/scripts/postinst-intercepts/update_udev_hwdb
>     > index c4fb2bffcbf..7b6e38338f3 100644
>     > --- a/scripts/postinst-intercepts/update_udev_hwdb
>     > +++ b/scripts/postinst-intercepts/update_udev_hwdb
>     > @@ -5,5 +5,7 @@
>     >   
>     >   set -e
>     >   
>     > -PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D
>     $D${libexecdir}/${binprefix}udevadm hwdb --update --root $D
>     > -chown root:root $D${sysconfdir}/udev/hwdb.bin
>     > +if [ -d $D/lib/udev/hwdb.d ]; then
>     > +     PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D
>     $D${libexecdir}/${binprefix}udevadm hwdb --update --root $D
>     > +     chown root:root $D${sysconfdir}/udev/hwdb.bin
>     > +fi
> 
> 
>     -- 
>     _______________________________________________
>     Openembedded-core mailing list
>     Openembedded-core@lists.openembedded.org
>     <mailto:Openembedded-core@lists.openembedded.org>
>     http://lists.openembedded.org/mailman/listinfo/openembedded-core
> 



  reply	other threads:[~2019-06-26 17:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-25 22:13 [PATCH v1] postinst-intercepts: check tool presence in intercept hooks Sinan Kaya
2019-06-26  2:27 ` ChenQi
2019-06-26  8:59   ` Alexander Kanavin
2019-06-26 17:33     ` Sinan Kaya [this message]
2019-06-26 18:10       ` Alexander Kanavin
2019-06-26 21:21       ` Richard Purdie
2019-06-26 22:57         ` Sinan Kaya
2019-06-27  8:46           ` Alexander Kanavin
2019-06-30 16:56             ` Sinan Kaya
2019-06-30 21:54               ` richard.purdie
2019-07-01  1:38                 ` Sinan Kaya
2019-06-27  8:57           ` richard.purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5647f634-725a-fd9e-3b13-369095f4d415@kernel.org \
    --to=okaya@kernel.org \
    --cc=Qi.Chen@windriver.com \
    --cc=alex.kanavin@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox