From 97ab9ffa735c8e82a6ce05c68dade5bd13713a0e Mon Sep 17 00:00:00 2001 From: Adam Duskett Date: Fri, 3 Sep 2021 09:20:21 -0700 Subject: [PATCH] package/gobject-introspection/g-ir-scanner-qemuwrapper.in: Fix latent bug if GIR_EXTRA_LIBS_PATH is empty If GIR_EXTRA_LIBS_PATH is empty, the LD_LIBRARY_PATH variable is ":.libs:$(dirname $0)/../lib:$(dirname $0)/../../lib". As discussed with Yann Morin, add a new variable, "GOI_LIBRARY_PATH" and prepend ${GIR_EXTRA_LIBS_PATH:+${GIR_EXTRA_LIBS_PATH}:} to the path to fix the above bug. Signed-off-by: Adam Duskett Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/gobject-introspection/g-ir-scanner-qemuwrapper.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package/gobject-introspection/g-ir-scanner-qemuwrapper.in b/package/gobject-introspection/g-ir-scanner-qemuwrapper.in index cad7ef875e..c76553515e 100644 --- a/package/gobject-introspection/g-ir-scanner-qemuwrapper.in +++ b/package/gobject-introspection/g-ir-scanner-qemuwrapper.in @@ -1,5 +1,7 @@ #!/usr/bin/env bash +GOI_LIBRARY_PATH="${GIR_EXTRA_LIBS_PATH:+${GIR_EXTRA_LIBS_PATH}:}.libs:$(dirname "$0")/../lib:$(dirname "$0")/../../lib" + # Pass -r to qemu-user as to trick glibc into not errorings out if the host kernel # is older than the target kernel. # Use a modules directory which does not exist so we don't load random things @@ -7,7 +9,7 @@ GIO_MODULE_DIR=$(dirname $0)/../lib/gio/modules-dummy \ @QEMU_USER@ -r @TOOLCHAIN_HEADERS_VERSION@ \ -L $(dirname $0)/../../ \ --E LD_LIBRARY_PATH=${GIR_EXTRA_LIBS_PATH}:.libs:$(dirname $0)/../lib:$(dirname $0)/../../lib \ +-E LD_LIBRARY_PATH="${GOI_LIBRARY_PATH}" \ "$@" if [[ $? -ne 0 ]]; then -- 2.30.2