gdb-add-index.patch: Use "command -v" instead of "which"

Resolves: RHEL-73209
This commit is contained in:
Keith Seitz 2025-01-08 10:14:24 -08:00
parent 2ec09d3f9c
commit 728cc31ddd
2 changed files with 7 additions and 3 deletions

View File

@ -52,11 +52,11 @@ 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" >/dev/null 2>&1; then
+ if ! command -v "$possible_gdb" >/dev/null 2>&1; then
+ continue
+ fi
+
+ possible_gdb=$(which "$possible_gdb")
+ possible_gdb=$(command -v "$possible_gdb")
+
+ if ! test -x "$possible_gdb"; then
+ continue

View File

@ -57,7 +57,7 @@ Version: 14.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: GPL-3.0-or-later AND BSD-3-Clause AND FSFAP AND LGPL-2.1-or-later AND GPL-2.0-or-later AND LGPL-2.0-or-later AND LicenseRef-Fedora-Public-Domain AND GFDL-1.3-or-later AND LGPL-2.0-or-later WITH GCC-exception-2.0 AND GPL-3.0-or-later WITH GCC-exception-3.1 AND GPL-2.0-or-later WITH GNU-compiler-exception
# Do not provide URL for snapshots as the file lasts there only for 2 days.
@ -1250,6 +1250,10 @@ fi
%endif
%changelog
* Wed Jan 9 2025 Keith Seitz <keiths@redhat.com> - 14.2-4.el9
- gdb-add-index.patch: Use "command -v" instead of "which".
(Keith Seitz, RHEL-73209)
* Fri May 31 2024 Guinevere Larsen <blarsen@redhat.com> - 14.2-1.el9
- Rebase to gdb-14.2 and update all bug references
(Resolves: RHEL-39554)