[OE-core] [PATCH] gobject-introspection.bbclass: Disable writing to $HOME/.cache/g-ir-scanner

Alexander Kanavin alex.kanavin at gmail.com
Thu Apr 11 14:44:09 UTC 2019


Generally because generating introspection data is disabled for native
packages, as a matter of policy (do not build something which is
unused and untested).

If you could add
EXTRA_OEMESON_append_class-native = " ${GI_DISABLE_FLAG}"

to the gdk-pixbuf recipe, and re-test (without your fix, to be extra
sure) that g-ir-scanner is not invoked and nothing shows up in its
cache, I would appreciate.

Alex

On Thu, 11 Apr 2019 at 15:10, Jason Wessel <jason.wessel at windriver.com> wrote:
>
>
> Please understand I have no idea how gdk-pixbuf-native is supposed to compile.  Perhaps you can elaborate further as to why g-ir-scanner cannot be called in this case.  I did not observe any obvious way that the g-ir-scanner was explicitly disabled for the build of the -native package with in the do_configure stage.
>
> Looking at the log files from the compilation phase it appears to use meson as the build tool.  The compile log file indicates that it is using the pkg-config tool to find g-ir-scanner and subsequently use it.
>
>
> Log file: x86_64-linux/gdk-pixbuf-native/2.38.0-r0/build/meson-logs/meson-log.txt
> ===
> Called `/poky/build/tmp/work/x86_64-linux/gdk-pixbuf-native/2.38.0-r0/recipe-sysroot-native/usr/bin/pkg-config-native --variable=g_ir_scanner gobject-introspection-1.0` -> 0
> /poky/build/tmp/work/x86_64-linux/gdk-pixbuf-native/2.38.0-r0/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/bin/g-ir-scanner
> Got pkgconfig variable g_ir_scanner : /poky/build/tmp/work/x86_64-linux/gdk-pixbuf-native/2.38.0-r0/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/bin/g-ir-scanner
>
> ===
>
>
> Jason.
>
> On 4/11/19 6:14 AM, Alexander Kanavin wrote:
> > gdk-pixbuf-native should not be running g-ir-scanner at all, as we
> > explicitly disable this for native builds. Can you please look into
> > why it is happening, because the patch is really treating the symptom
> > rather than the problem.
> >
> > Alex
> >
> > On Wed, 10 Apr 2019 at 23:54, Jason Wessel <jason.wessel at windriver.com> wrote:
> >>
> >> Investigation of an end user going over their quota in the user's home
> >> directory showed that the gobject-instrospection is writing files into
> >> the ~/.cache/g-ir-scanner when building -native packages.  The test
> >> package in this case was gdk-pixbuf-native.
> >>
> >> Setting the GI_SCANNER_DISABLE_CACHE in the bbclass should be all that
> >> is needed.  The qemu wrapper was already setting this properly, but we
> >> also need it for the -native builds.
> >>
> >> meta/recipes-gnome/gobject-introspection/gobject-introspection_1.58.3.bb:131:
> >> export GI_SCANNER_DISABLE_CACHE=1
> >>
> >> Signed-off-by: Jason Wessel <jason.wessel at windriver.com>
> >> ---
> >>  meta/classes/gobject-introspection.bbclass | 3 +++
> >>  1 file changed, 3 insertions(+)
> >>
> >> diff --git a/meta/classes/gobject-introspection.bbclass b/meta/classes/gobject-introspection.bbclass
> >> index 4ceb0c68b1..359620fba7 100644
> >> --- a/meta/classes/gobject-introspection.bbclass
> >> +++ b/meta/classes/gobject-introspection.bbclass
> >> @@ -27,6 +27,9 @@ DEPENDS_append_class-nativesdk = " gobject-introspection-native"
> >>  # This is used by introspection tools to find .gir includes
> >>  export XDG_DATA_DIRS = "${STAGING_DATADIR}:${STAGING_LIBDIR}"
> >>
> >> +# Disable writing to $HOME/.cache/g-ir-scanner
> >> +export GI_SCANNER_DISABLE_CACHE = "1"
> >> +
> >>  do_configure_prepend_class-target () {
> >>      # introspection.m4 pre-packaged with upstream tarballs does not yet
> >>      # have our fixes
> >> --
> >> 2.17.1
> >>
> >> --
> >> _______________________________________________
> >> Openembedded-core mailing list
> >> Openembedded-core at lists.openembedded.org
> >> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>


More information about the Openembedded-core mailing list