public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/gdb] gdb-17.2-rebase-f44: Adjust gdb-add-index.patch to be silent about which gdb
@ 2026-06-28  0:01 Mark Wielaard
  0 siblings, 0 replies; only message in thread
From: Mark Wielaard @ 2026-06-28  0:01 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/gdb
            Branch : gdb-17.2-rebase-f44
            Commit : 2b402b25f45937bd25331859a08225d4233c383d
            Author : Mark Wielaard <mark@klomp.org>
            Date   : 2023-07-01T18:31:16+02:00
            Stats  : +5/-2 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/gdb/c/2b402b25f45937bd25331859a08225d4233c383d?branch=gdb-17.2-rebase-f44

            Log:
            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.

---
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 <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).

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-28  0:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-28  0:01 [rpms/gdb] gdb-17.2-rebase-f44: Adjust gdb-add-index.patch to be silent about which gdb Mark Wielaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox