| 1 | From daa829287894273879799a383ed4dc373c6111b0 Mon Sep 17 00:00:00 2001
|
| 2 | From: Alyssa Ross <[email protected]>
|
| 3 | Date: Wed, 8 May 2024 09:49:59 +0200
|
| 4 | Subject: [PATCH] build: prepend to LD_LIBRARY_PATH and GI_TYPELIB_PATH
|
| 5 |
|
| 6 | In Nixpkgs packages are installed in separate prefixes.
|
| 7 | Starting from GLib / gobject-introspection 2.80, GLib introspection data
|
| 8 | is provided by GLib itself instead of gobject-introspection. This causes
|
| 9 | tests failures in Nixpkgs because the GI_TYPELIB_PATH set by the build
|
| 10 | environment was overridden, leaving it unable to find GLib:
|
| 11 |
|
| 12 | ImportError: cannot import name GLib, introspection typelib not found
|
| 13 |
|
| 14 | Only GI_TYPELIB_PATH needs to be preserved in our case, but I've made
|
| 15 | the same change for LD_LIBRARY_PATH, other environments might rely on
|
| 16 | that in a similar way.
|
| 17 | ---
|
| 18 | tools/tests/test-wrapper.sh.in | 5 ++++-
|
| 19 | 1 file changed, 4 insertions(+), 1 deletion(-)
|
| 20 |
|
| 21 | diff --git a/tools/tests/test-wrapper.sh.in b/tools/tests/test-wrapper.sh.in
|
| 22 | index fb8cd5e8d5..d6484bed60 100755
|
| 23 | |
| 24 | |
| 25 | @@ -1,5 +1,8 @@
|
| 26 | #!/bin/sh
|
| 27 |
|
| 28 | +export LD_LIBRARY_PATH=@abs_top_builddir@/libmm-glib"${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH}"
|
| 29 | +export GI_TYPELIB_PATH=@abs_top_builddir@/libmm-glib"${GI_TYPELIB_PATH+:$GI_TYPELIB_PATH}"
|
| 30 | +
|
| 31 | # For debugging behavior of test-modemmanager-service.py, you can modify
|
| 32 | # this line to add --log-file option
|
| 33 | -LD_LIBRARY_PATH=@abs_top_builddir@/libmm-glib GI_TYPELIB_PATH=@abs_top_builddir@/libmm-glib @abs_top_srcdir@/tools/test-modemmanager-service.py
|
| 34 | +exec @abs_top_srcdir@/tools/test-modemmanager-service.py
|
| 35 | --
|
| 36 | GitLab
|
| 37 |
|