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>
+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):
-
-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
-
-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