]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
config: do not define DEBUGINFOD_URLS environment variable unnecessarily
authorDmitry V. Levin <ldv@altlinux.org>
Wed, 4 Nov 2020 08:00:00 +0000 (08:00 +0000)
committerMark Wielaard <mark@klomp.org>
Mon, 9 Nov 2020 13:27:37 +0000 (14:27 +0100)
Before this change, when elfutils was configured without
--enable-debuginfod-urls, the installed profile.d/debuginfod.sh and
profile.d/debuginfod.csh scripts used to define the DEBUGINFOD_URLS
environment variable as an non-empty string containing spaces, making
all libdebuginfod users do extra work.

Change these scripts to avoid defining the DEBUGINFOD_URLS environment
variable unless configured using --enable-debuginfod-urls.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
config/ChangeLog
config/profile.csh.in
config/profile.sh.in

index e69e7e2147c1250f7c68ba3cecba73cc80da85ce..e4da0ebc502aa68fe310565e86aaf0182f91ac9e 100644 (file)
@@ -1,3 +1,8 @@
+2020-11-04  Dmitry V. Levin  <ldv@altlinux.org>
+
+       * profile.sh.in, profile.csh.in: Do not define $DEBUGINFOD_URLS unless
+       configured using --enable-debuginfod-urls.
+
 2020-11-02  Dmitry V. Levin  <ldv@altlinux.org>
 
        * Makefile.am (pkgconfig_DATA, install-data-local, uninstall-local):
index 4f25896d1fc5326bb1c7c4b5b83442b1562a8bbb..0a2d6d16201938e085bc4e1f3fbfdc9e5dffdbbf 100644 (file)
@@ -1,2 +1,11 @@
-
-setenv DEBUGINFOD_URLS "$DEBUGINFOD_URLS @DEBUGINFOD_URLS@"
+if ("@DEBUGINFOD_URLS@" != "") then
+       if ($?DEBUGINFOD_URLS) then
+               if ($%DEBUGINFOD_URLS) then
+                       setenv DEBUGINFOD_URLS "$DEBUGINFOD_URLS @DEBUGINFOD_URLS@"
+               else
+                       setenv DEBUGINFOD_URLS "@DEBUGINFOD_URLS@"
+               endif
+       else
+               setenv DEBUGINFOD_URLS "@DEBUGINFOD_URLS@"
+       endif
+endif
index 8a022489e3749738b62be53ff6544181100e9e18..aa228a0dcd16c9eca5c8961e337d7dfef2ee1abf 100644 (file)
@@ -1,3 +1,4 @@
-
-DEBUGINFOD_URLS="$DEBUGINFOD_URLS @DEBUGINFOD_URLS@"
-export DEBUGINFOD_URLS
+if [ -n "@DEBUGINFOD_URLS@" ]; then
+       DEBUGINFOD_URLS="${DEBUGINFOD_URLS-}${DEBUGINFOD_URLS:+ }@DEBUGINFOD_URLS@"
+       export DEBUGINFOD_URLS
+fi