gobject-introspection.bbclass: Disable writing to $HOME/.cache/g-ir-scanner
PATCH 1/1 gobject-introspection.bbclass: Disable writing to $HOME/.cache/g-ir-scanner
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
--- meta/classes/gobject-introspection.bbclass | 3 +++ 1 file changed, 3 insertions(+)
meta/classes/gobject-introspection.bbclass +3 -0
@@ -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
Signature · 1 line
2.17.1
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
Quoted 40 lines · Jason Wessel
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_CACHEin 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=1Signed-off-by Jason Wessel <[email protected]>--- meta/classes/gobject-introspection.bbclass | 3 +++ 1 file changed, 3 insertions(+)meta/classes/gobject-introspection.bbclass +3
-1@@ -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
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
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.
Quoted 48 lines · Alexander Kanavin
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
Quoted 40 lines · Jason Wessel
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_CACHEin 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=1Signed-off-by Jason Wessel <[email protected]>--- meta/classes/gobject-introspection.bbclass | 3 +++ 1 file changed, 3 insertions(+)meta/classes/gobject-introspection.bbclass +3
-1@@ -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
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
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
Quoted 68 lines · Jason Wessel
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_configurestage.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 variableg_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.
Quoted 48 lines · Alexander Kanavin
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
Quoted 40 lines · Jason Wessel
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_CACHEin 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=1Signed-off-by Jason Wessel <[email protected]>--- meta/classes/gobject-introspection.bbclass | 3 +++ 1 file changed, 3 insertions(+)meta/classes/gobject-introspection.bbclass +3
-1@@ -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
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Quoted 10 lines · Alexander Kanavin
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.
Thank you for the explanation. I think the problem is more widespread than just gdk-pixbuf, now that I have a slightly better idea about what we are looking for. My build is not even complete and I can see there are three additional places the g-ir-scanner is creating .cache entries.
/poky/build% grep -r /usr/bin/g-ir-scanner tmp/work/*/*/*/temp |awk -F/ '{print $4}' |sort -u atk-native
at-spi2-core-native
pango-native
Is it the case the bbclass file should be altered to set this variable for the -native, or does each package need to be modified individually?
Jason.
Quoted 14 lines · Jason Wessel
Quoted 10 lines
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.
Thank you for the explanation. I think the problem is more widespread than just gdk-pixbuf, now that I have a slightly better idea about what we are looking for. My build is not even complete and I can see there are three additional places the g-ir-scanner is creating .cache entries.
Quoted 7 lines
/poky/build% grep -r
/usr/bin/g-ir-scannertmp/work/*/*/*/temp |awk -F/ '{print $4}' |sort -u atk-native
at-spi2-core-native
pango-nativeIs it the case the bbclass file should be altered to set this variable for the -native, or does each package need to be modified individually?
I think Andreas's patchset that was recently posted (and is currently in master-next) takes care of this in a general way, where you don't have to go and fix every recipe. The unfortunate bit is that meson does not have a standard flag for enabling/disabling introspection, but we found a way to deal with this that is as generic as possible.
If you try with master-next, would be good to know.
Alex
Quoted 23 lines · Alexander Kanavin
Quoted 14 lines · Jason Wessel
Quoted 10 lines
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.
Thank you for the explanation. I think the problem is more widespread than just gdk-pixbuf, now that I have a slightly better idea about what we are looking for. My build is not even complete and I can see there are three additional places the g-ir-scanner is creating .cache entries.
Quoted 7 lines
/poky/build% grep -r
/usr/bin/g-ir-scannertmp/work/*/*/*/temp |awk -F/ '{print $4}' |sort -u atk-native
at-spi2-core-native
pango-nativeIs it the case the bbclass file should be altered to set this variable for the -native, or does each package need to be modified individually?
Quoted 8 lines
I think Andreas's patchset that was recently posted (and is currently in master-next) takes care of this in a general way, where you don't have to go and fix every recipe. The unfortunate bit is that meson does not have a standard flag for enabling/disabling introspection, but we found a way to deal with this that is as generic as possible.
If you try with master-next, would be good to know.
It all appears to work fine without the need to patch anything in master-next.
Thank you for the explanation.
Jason.
Quoted 44 lines · Jason Wessel
Quoted 43 lines · Alexander Kanavin
Quoted 28 lines · Jason Wessel
Quoted 6 lines
Generally because generating introspection data is disabled for native
packages, as a matter of policy (do not build something which is
unused and untested).Quoted 8 lines
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.Thank you for the explanation. I think the problem is more widespread than just gdk-pixbuf, now that I have a slightly better idea about what we are looking for. My build is not even complete and I can see there are three additional places the g- ir-scanner is creating .cache entries.
/poky/build% grep -r
/usr/bin/g-ir-scannertmp/work/*/*/*/temp |awk -F/ '{print $4}' |sort -u
atk-native
at-spi2-core-native
pango-nativeQuoted 3 lines
Is it the case the bbclass file should be altered to set this variable for the -native, or does each package need to be modified individually?
I think Andreas's patchset that was recently posted (and is currently
in master-next) takes care of this in a general way, where you don't
have to go and fix every recipe. The unfortunate bit is that meson does not have a standard flag for enabling/disabling introspection, but we found a way to deal with this that is as generic as possible.
Quoted 7 lines
Quoted 2 lines
If you try with master-next, would be good to know.
It all appears to work fine without the need to patch anything in master-next.
Thank you for the explanation.
This is starting to look like something we probably want to pull into the warrior release given the problems with meson converted recipes otherwise?
Cheers,
Richard
Yes, I agree.
Alex
Quoted 63 lines · Richard Purdie
Quoted 46 lines · Jason Wessel
Quoted 44 lines · Alexander Kanavin
Quoted 28 lines · Jason Wessel
Quoted 6 lines
Generally because generating introspection data is disabled for native
packages, as a matter of policy (do not build something which is
unused and untested).Quoted 8 lines
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.Thank you for the explanation. I think the problem is more widespread than just gdk-pixbuf, now that I have a slightly better idea about what we are looking for. My build is not even complete and I can see there are three additional places the g- ir-scanner is creating .cache entries.
/poky/build% grep -r
/usr/bin/g-ir-scannertmp/work/*/*/*/temp |awk -F/ '{print $4}' |sort -u
atk-native
at-spi2-core-native
pango-nativeQuoted 3 lines
Is it the case the bbclass file should be altered to set this variable for the -native, or does each package need to be modified individually?
I think Andreas's patchset that was recently posted (and is currently
in master-next) takes care of this in a general way, where you don't
have to go and fix every recipe. The unfortunate bit is that meson does not have a standard flag for enabling/disabling introspection, but we found a way to deal with this that is as generic as possible.Quoted 7 lines
Quoted 2 lines
If you try with master-next, would be good to know.
It all appears to work fine without the need to patch anything in master-next.
Thank you for the explanation.
This is starting to look like something we probably want to pull into the warrior release given the problems with meson converted recipes otherwise?
Cheers,
Richard
Quoted 17 lines · Alexander Kanavin
Yes, I agree.
Alex
Quoted 13 lines · Richard Purdie
Quoted 7 lines · Jason Wessel
It all appears to work fine without the need to patch anything in master-next.
Thank you for the explanation.
This is starting to look like something we probably want to pull into the warrior release given the problems with meson converted recipes otherwise?
I concur, with Alex. I talked to Mark Hatle about this earlier today. If it is not fixed prior to the release of the warrior branch we were going to submit it as a back port, due to the fact this causes build stability problems.
Jason.
Quoted 23 lines · Jason Wessel
Quoted 21 lines · Alexander Kanavin
Yes, I agree.
Alex
Quoted 17 lines
Quoted 7 lines · Richard Purdie
On Thu, 2019-04-11 at 11:36 -0500, Jason Wessel wrote:
It all appears to work fine without the need to patch anything in
master-next.Thank you for the explanation.
This is starting to look like something we probably want to pull into
the warrior release given the problems with meson converted recipes
otherwise?
Quoted 4 lines
I concur, with Alex. I talked to Mark Hatle about this earlier today. If it is not fixed prior to the release of the warrior branch we were going to submit it as a back port, due to the fact this causes build stability problems.
Agreed. Good news is it was already tested on master-next and its had time for review so I just merged it.
Cheers,
Richard