diff mbox series

gobject-introspection: disable cache for g-ir-scanner

Message ID 20260325074937.2568123-1-hongxu.jia@windriver.com
State Under Review
Headers show
Series gobject-introspection: disable cache for g-ir-scanner | expand

Commit Message

Hongxu Jia March 25, 2026, 7:49 a.m. UTC
An intermittent failure occurs in gobject-introspection do_compile:
[snip]
|Traceback (most recent call last):
|  File "tmp/work/cortexa57-wrs-linux/gobject-introspection/1.86.0/recipe-sysroot-native/usr/lib/python3.14/shutil.py", line 918, in move
|    os.rename(src, real_dst)
|    ~~~~~~~~~^^^^^^^^^^^^^^^
|OSError: [Errno 18] Invalid cross-device link: '/tmp/g-ir-scanner-cache-version-89xkkvp4' -> '/folk/hjia/.cache/g-ir-scanner/.cache-version'
|
|During handling of the above exception, another exception occurred:
|
|Traceback (most recent call last):
|  File "tmp/work/cortexa57-wrs-linux/gobject-introspection/1.86.0/recipe-sysroot-native/usr/bin/g-ir-scanner", line 134, in <module>
|    sys.exit(scanner_main(args))
|             ~~~~~~~~~~~~^^^^^^
|  File "tmp/work/cortexa57-wrs-linux/gobject-introspection/1.86.0/recipe-sysroot-native/usr/lib/gobject-introspection/giscanner/scannermain.py", line 653, in scanner_main
|    transformer = create_transformer(namespace, options)
|  File "tmp/work/cortexa57-wrs-linux/gobject-introspection/1.86.0/recipe-sysroot-native/usr/lib/gobject-introspection/giscanner/scannermain.py", line 446, in create_transformer
|    transformer = Transformer(namespace,
|                              accept_unprefixed=options.accept_unprefixed,
|                              identifier_filter_cmd=identifier_filter_cmd,
|                              symbol_filter_cmd=symbol_filter_cmd)
|  File "tmp/work/cortexa57-wrs-linux/gobject-introspection/1.86.0/recipe-sysroot-native/usr/lib/gobject-introspection/giscanner/transformer.py", line 49, in __init__
|    self._cachestore = CacheStore()
|                       ~~~~~~~~~~^^
|  File "tmp/work/cortexa57-wrs-linux/gobject-introspection/1.86.0/recipe-sysroot-native/usr/lib/gobject-introspection/giscanner/cachestore.py", line 52, in __init__
|    self._check_cache_version()
|    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
|  File "tmp/work/cortexa57-wrs-linux/gobject-introspection/1.86.0/recipe-sysroot-native/usr/lib/gobject-introspection/giscanner/cachestore.py", line 89, in _check_cache_version
|    shutil.move(tmp_filename, version)
|    ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
|  File "tmp/work/cortexa57-wrs-linux/gobject-introspection/1.86.0/recipe-sysroot-native/usr/lib/python3.14/shutil.py", line 938, in move
|    copy_function(src, real_dst)
|    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^
|  File "tmp/work/cortexa57-wrs-linux/gobject-introspection/1.86.0/recipe-sysroot-native/usr/lib/python3.14/shutil.py", line 529, in copy2
|    copyfile(src, dst, follow_symlinks=follow_symlinks)
|    ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|  File "tmp/work/cortexa57-wrs-linux/gobject-introspection/1.86.0/recipe-sysroot-native/usr/lib/python3.14/shutil.py", line 315, in copyfile
|    with open(dst, 'wb') as fdst:
|         ~~~~^^^^^^^^^^^
|OSError: [Errno 122] Disk quota exceeded
[snip]

In commit [1], it moved the fix to gobject-introspection-data.bbclass, and recipe gobject-introspection
inherits gobject-introspection-data.bbclass.

But commit [2] moved the fix to gobject-introspection.bbclass which recipe gobject-introspection
does not inherits it

Explicitly add the fix back to recipe gobject-introspection

[1] https://git.openembedded.org/openembedded-core/commit/?id=35d5f707f6bb2ce5e9ab908e66e1ea9eeac754b1
[2] https://git.openembedded.org/openembedded-core/commit/?id=49988a49f7c9a19aa2a547d49369996e3e20d452

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 .../gobject-introspection/gobject-introspection_1.86.0.bb       | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.86.0.bb b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.86.0.bb
index f8eab2797f..506ed99076 100644
--- a/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.86.0.bb
+++ b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.86.0.bb
@@ -114,6 +114,8 @@  EOF
 do_compile:prepend() {
         # Needed to run g-ir unit tests, which won't be able to find the built libraries otherwise
         export GIR_EXTRA_LIBS_PATH=$B/.libs
+        # This prevents g-ir-scanner from writing cache data to $HOME
+        export GI_SCANNER_DISABLE_CACHE=1
 }
 
 do_install:prepend() {