From: "Dmitry V. Levin" <ldv@altlinux.org>
To: elfutils-devel@sourceware.org
Cc: Vitaly Chikunov <vt@altlinux.org>
Subject: [PATCH 2/1] config: do not define DEBUGINFOD_URLS environment variable unnecessarily
Date: Wed, 4 Nov 2020 08:00:00 +0000 [thread overview]
Message-ID: <20201104080000.GA28269@altlinux.org> (raw)
In-Reply-To: <20201102080000.GA22615@altlinux.org>
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 | 5 +++++
config/profile.csh.in | 13 +++++++++++--
config/profile.sh.in | 7 ++++---
3 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/config/ChangeLog b/config/ChangeLog
index e69e7e21..e4da0ebc 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -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):
diff --git a/config/profile.csh.in b/config/profile.csh.in
index 4f25896d..0a2d6d16 100644
--- a/config/profile.csh.in
+++ b/config/profile.csh.in
@@ -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
diff --git a/config/profile.sh.in b/config/profile.sh.in
index 8a022489..aa228a0d 100644
--- a/config/profile.sh.in
+++ b/config/profile.sh.in
@@ -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
--
ldv
next prev parent reply other threads:[~2020-11-04 23:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-02 8:00 [PATCH] config: Conditionalize on LIBDEBUGINFOD instead of DEBUGINFOD Dmitry V. Levin
2020-11-03 16:58 ` Mark Wielaard
2020-11-03 17:07 ` Frank Ch. Eigler
2020-11-03 17:26 ` Mark Wielaard
2020-11-03 17:32 ` Frank Ch. Eigler
2020-11-03 22:20 ` Dmitry V. Levin
2020-11-04 11:47 ` Frank Ch. Eigler
2020-11-04 8:00 ` Dmitry V. Levin [this message]
2020-11-09 13:31 ` [PATCH 2/1] config: do not define DEBUGINFOD_URLS environment variable unnecessarily Mark Wielaard
2020-11-09 13:30 ` [PATCH] config: Conditionalize on LIBDEBUGINFOD instead of DEBUGINFOD Mark Wielaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201104080000.GA28269@altlinux.org \
--to=ldv@altlinux.org \
--cc=elfutils-devel@sourceware.org \
--cc=vt@altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).