* [PATCH] config: Remove unnecessary setting/unsetting of prefix in profiles
@ 2022-06-29 16:48 Mark Wielaard
2022-06-29 17:29 ` Frank Ch. Eigler
0 siblings, 1 reply; 4+ messages in thread
From: Mark Wielaard @ 2022-06-29 16:48 UTC (permalink / raw)
To: elfutils-devel; +Cc: Mark Wielaard
In both profile.csh.in and profile.sh.in we set and then unset
prefix, but never use it.
Signed-off-by: Mark Wielaard <mark@klomp.org>
---
config/ChangeLog | 5 +++++
config/profile.csh.in | 2 --
config/profile.sh.in | 2 --
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/config/ChangeLog b/config/ChangeLog
index cfb37b42..603fbcb0 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,3 +1,8 @@
+2022-06-29 Mark Wielaard <mark@klomp.org>
+
+ * profile.csh.in: Remove setting/unsetting of prefix.
+ * profile.sh.in: Likewise.
+
2022-05-03 Mark Wielaard <mark@klomp.org>
* profile.csh.in: Move the 2>/dev/null inside the sh -c '' quotes.
diff --git a/config/profile.csh.in b/config/profile.csh.in
index 74c20c99..b61b467b 100644
--- a/config/profile.csh.in
+++ b/config/profile.csh.in
@@ -5,12 +5,10 @@
# such as $DEBUGINFOD_MAXSIZE, $DEBUGINFOD_MAXTIME, $DEBUGINFOD_PROGRESS.
if (! $?DEBUGINFOD_URLS) then
- set prefix="@prefix@"
set DEBUGINFOD_URLS=`sh -c 'cat "$0"/*.urls 2>/dev/null; :' "@sysconfdir@/debuginfod" | tr '\n' ' '`
if ( "$DEBUGINFOD_URLS" != "" ) then
setenv DEBUGINFOD_URLS "$DEBUGINFOD_URLS"
else
unset DEBUGINFOD_URLS
endif
- unset prefix
endif
diff --git a/config/profile.sh.in b/config/profile.sh.in
index bad20b1e..9a978a6b 100644
--- a/config/profile.sh.in
+++ b/config/profile.sh.in
@@ -5,8 +5,6 @@
# such as $DEBUGINFOD_MAXSIZE, $DEBUGINFOD_MAXTIME, $DEBUGINFOD_PROGRESS.
if [ -z "$DEBUGINFOD_URLS" ]; then
- prefix="@prefix@"
DEBUGINFOD_URLS=$(cat "@sysconfdir@/debuginfod"/*.urls 2>/dev/null | tr '\n' ' ')
[ -n "$DEBUGINFOD_URLS" ] && export DEBUGINFOD_URLS || unset DEBUGINFOD_URLS
- unset prefix
fi
--
2.18.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] config: Remove unnecessary setting/unsetting of prefix in profiles
2022-06-29 16:48 [PATCH] config: Remove unnecessary setting/unsetting of prefix in profiles Mark Wielaard
@ 2022-06-29 17:29 ` Frank Ch. Eigler
2022-06-29 18:33 ` Mark Wielaard
0 siblings, 1 reply; 4+ messages in thread
From: Frank Ch. Eigler @ 2022-06-29 17:29 UTC (permalink / raw)
To: Mark Wielaard; +Cc: elfutils-devel
Hi -
> In both profile.csh.in and profile.sh.in we set and then unset
> prefix, but never use it.
It is used, because the autoconf @sysconfdir@ macro expands to a
string like "$prefix/...", which requires the shell variable $prefix
to be set.
- FChE
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] config: Remove unnecessary setting/unsetting of prefix in profiles
2022-06-29 17:29 ` Frank Ch. Eigler
@ 2022-06-29 18:33 ` Mark Wielaard
2022-06-29 20:08 ` Dmitry V. Levin
0 siblings, 1 reply; 4+ messages in thread
From: Mark Wielaard @ 2022-06-29 18:33 UTC (permalink / raw)
To: Frank Ch. Eigler; +Cc: elfutils-devel
Hi Frank,
On Wed, Jun 29, 2022 at 01:29:04PM -0400, Frank Ch. Eigler wrote:
> > In both profile.csh.in and profile.sh.in we set and then unset
> > prefix, but never use it.
>
> It is used, because the autoconf @sysconfdir@ macro expands to a
> string like "$prefix/...", which requires the shell variable $prefix
> to be set.
O, I see. Indeed the default is '${prefix}/etc'. But I never saw that
because in a package install configure is called with everything
expanded [*]. Should have tried by hand.
Patch retracted.
Thanks,
Mark
[*] --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin
--sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share
--includedir=/usr/include --libdir=/usr/lib64
--libexecdir=/usr/libexec --localstatedir=/var
--sharedstatedir=/var/lib --mandir=/usr/share/man
--infodir=/usr/share/info
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] config: Remove unnecessary setting/unsetting of prefix in profiles
2022-06-29 18:33 ` Mark Wielaard
@ 2022-06-29 20:08 ` Dmitry V. Levin
0 siblings, 0 replies; 4+ messages in thread
From: Dmitry V. Levin @ 2022-06-29 20:08 UTC (permalink / raw)
To: Mark Wielaard; +Cc: Frank Ch. Eigler, elfutils-devel
Hi,
On Wed, Jun 29, 2022 at 08:33:19PM +0200, Mark Wielaard wrote:
> Hi Frank,
>
> On Wed, Jun 29, 2022 at 01:29:04PM -0400, Frank Ch. Eigler wrote:
> > > In both profile.csh.in and profile.sh.in we set and then unset
> > > prefix, but never use it.
> >
> > It is used, because the autoconf @sysconfdir@ macro expands to a
> > string like "$prefix/...", which requires the shell variable $prefix
> > to be set.
>
> O, I see. Indeed the default is '${prefix}/etc'. But I never saw that
> because in a package install configure is called with everything
> expanded [*]. Should have tried by hand.
This is not the first time when a patch removing these definitions of
"prefix" variable is proposed. In fact, I applied a similar patch in my
tree last year because I always use --sysconfdir=/etc and "prefix" is a
very generic name so I prefer not to tamper with it in profile scripts.
--
ldv
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-06-29 20:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-29 16:48 [PATCH] config: Remove unnecessary setting/unsetting of prefix in profiles Mark Wielaard
2022-06-29 17:29 ` Frank Ch. Eigler
2022-06-29 18:33 ` Mark Wielaard
2022-06-29 20:08 ` Dmitry V. Levin
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).