* [PATCH] Support nullglob in profile.sh.in
@ 2024-05-13 12:04 Andreas Schwab
2024-05-13 12:19 ` Dmitry V. Levin
0 siblings, 1 reply; 3+ messages in thread
From: Andreas Schwab @ 2024-05-13 12:04 UTC (permalink / raw)
To: elfutils-devel
Don't block on stdin when /etc/debuginfod/*.certpath expands to nothing.
Signed-off-by: Andreas Schwab <schwab@suse.de>
---
config/profile.sh.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/config/profile.sh.in b/config/profile.sh.in
index 911c7a43..5e86f433 100644
--- a/config/profile.sh.in
+++ b/config/profile.sh.in
@@ -11,7 +11,7 @@ if [ -z "$DEBUGINFOD_URLS" ]; then
fi
if [ -z "$DEBUGINFOD_IMA_CERT_PATH" ]; then
- DEBUGINFOD_IMA_CERT_PATH=$(cat "@sysconfdir@/debuginfod"/*.certpath 2>/dev/null | tr '\n' ':' || :)
+ DEBUGINFOD_IMA_CERT_PATH=$(cat /dev/null "@sysconfdir@/debuginfod"/*.certpath 2>/dev/null | tr '\n' ':' || :)
[ -n "$DEBUGINFOD_IMA_CERT_PATH" ] && export DEBUGINFOD_IMA_CERT_PATH || unset DEBUGINFOD_IMA_CERT_PATH
fi
unset prefix
--
2.45.0
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Support nullglob in profile.sh.in
2024-05-13 12:04 [PATCH] Support nullglob in profile.sh.in Andreas Schwab
@ 2024-05-13 12:19 ` Dmitry V. Levin
2024-05-13 15:09 ` Frank Ch. Eigler
0 siblings, 1 reply; 3+ messages in thread
From: Dmitry V. Levin @ 2024-05-13 12:19 UTC (permalink / raw)
To: elfutils-devel
On Mon, May 13, 2024 at 02:04:04PM +0200, Andreas Schwab wrote:
> Don't block on stdin when /etc/debuginfod/*.certpath expands to nothing.
>
> Signed-off-by: Andreas Schwab <schwab@suse.de>
> ---
> config/profile.sh.in | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/config/profile.sh.in b/config/profile.sh.in
> index 911c7a43..5e86f433 100644
> --- a/config/profile.sh.in
> +++ b/config/profile.sh.in
> @@ -11,7 +11,7 @@ if [ -z "$DEBUGINFOD_URLS" ]; then
> fi
>
> if [ -z "$DEBUGINFOD_IMA_CERT_PATH" ]; then
> - DEBUGINFOD_IMA_CERT_PATH=$(cat "@sysconfdir@/debuginfod"/*.certpath 2>/dev/null | tr '\n' ':' || :)
> + DEBUGINFOD_IMA_CERT_PATH=$(cat /dev/null "@sysconfdir@/debuginfod"/*.certpath 2>/dev/null | tr '\n' ':' || :)
> [ -n "$DEBUGINFOD_IMA_CERT_PATH" ] && export DEBUGINFOD_IMA_CERT_PATH || unset DEBUGINFOD_IMA_CERT_PATH
> fi
> unset prefix
I slightly prefer "cat </dev/null" idiom as it stronger highlights the intent
but this variant is also fine.
--
ldv
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Support nullglob in profile.sh.in
2024-05-13 12:19 ` Dmitry V. Levin
@ 2024-05-13 15:09 ` Frank Ch. Eigler
0 siblings, 0 replies; 3+ messages in thread
From: Frank Ch. Eigler @ 2024-05-13 15:09 UTC (permalink / raw)
To: Dmitry V. Levin, schwab; +Cc: elfutils-devel
Hi -
> > Don't block on stdin when /etc/debuginfod/*.certpath expands to nothing.
> > Signed-off-by: Andreas Schwab <schwab@suse.de>
Thanks, committed as obvious.
> I slightly prefer "cat </dev/null" idiom as it stronger highlights the intent
> but this variant is also fine.
I see your point, but the other five cases in the profile.* use this
formulation, so for simpleminded consistency, went with the above.
- FChE
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-05-13 15:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-13 12:04 [PATCH] Support nullglob in profile.sh.in Andreas Schwab
2024-05-13 12:19 ` Dmitry V. Levin
2024-05-13 15:09 ` Frank Ch. Eigler
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).