From 2b402b25f45937bd25331859a08225d4233c383d Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Sat, 1 Jul 2023 18:31:05 +0200 Subject: [PATCH] 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. --- gdb-add-index.patch | 2 +- gdb.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gdb-add-index.patch b/gdb-add-index.patch index b95e06f..5039172 100644 --- a/gdb-add-index.patch +++ b/gdb-add-index.patch @@ -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 + diff --git a/gdb.spec b/gdb.spec index 13e4f89..2142369 100644 --- a/gdb.spec +++ b/gdb.spec @@ -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 - 13.2-4 +- Adjust gdb-add-index.patch to be silent about which gdb. + * Fri Jun 30 2023 Kevin Buettner - 13.2-3 - Backport upstream changes which prevent repeated warnings from being printed when loading a core file (RHBZ 2160211, Lancelot SIX).