Adjust gdb-add-index.patch to be silent about which gdb

Every invocation of gdb-add-index will print which possible
gdb command will be used. This is because the which command
always prints the name of the command found. Redirect both
stdout and stderr to /dev/null to suppress this when the
output isn't needed.
This commit is contained in:
Mark Wielaard 2023-07-01 18:31:05 +02:00
parent d5dc87ea90
commit 2b402b25f4
2 changed files with 5 additions and 2 deletions

View File

@ -52,7 +52,7 @@ diff --git a/gdb/contrib/gdb-add-index.sh b/gdb/contrib/gdb-add-index.sh
+# exit.
+if test -z "$GDB"; then
+ for possible_gdb in /usr/bin/gdb.minimal gdb /usr/libexec/gdb; do
+ if ! which "$possible_gdb" 2>/dev/null; then
+ if ! which "$possible_gdb" >/dev/null 2>&1; then
+ continue
+ fi
+

View File

@ -57,7 +57,7 @@ Version: 13.2
# The release always contains a leading reserved number, start it at 1.
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
Release: 3%{?dist}
Release: 4%{?dist}
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and LGPLv3+ and BSD and Public Domain and GFDL
# Do not provide URL for snapshots as the file lasts there only for 2 days.
@ -1252,6 +1252,9 @@ fi
%endif
%changelog
* Sat Jul 1 2023 Mark Wielaard <mjw@fedoraproject.org> - 13.2-4
- Adjust gdb-add-index.patch to be silent about which gdb.
* Fri Jun 30 2023 Kevin Buettner <kevinb@redhat.com> - 13.2-3
- Backport upstream changes which prevent repeated warnings from being
printed when loading a core file (RHBZ 2160211, Lancelot SIX).