public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/gdb] gdb-17.2-rebase-f44: rpm-suggstions.py: Output ModuleNotFoundError message to stderr
Date: Sun, 28 Jun 2026 00:01:43 GMT	[thread overview]
Message-ID: <178260490384.1.9433010784255281305.rpms-gdb-485076cf4a03@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/gdb
            Branch : gdb-17.2-rebase-f44
            Commit : 485076cf4a03a00727b41dd2ccd9054d72a665f6
            Author : Kevin Buettner <kevinb@redhat.com>
            Date   : 2024-06-18T13:36:35-07:00
            Stats  : +9/-3 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/gdb/c/485076cf4a03a00727b41dd2ccd9054d72a665f6?branch=gdb-17.2-rebase-f44

            Log:
            rpm-suggstions.py: Output ModuleNotFoundError message to stderr

Revise rpm-suggestions.py script so that message regarding a not-found
'rpm' module is output to stderr.  (RHBZ 2275274)

---
diff --git a/gdb-add-rpm-suggestion-script.patch b/gdb-add-rpm-suggestion-script.patch
index 1efb387..f8d72fe 100644
--- a/gdb-add-rpm-suggestion-script.patch
+++ b/gdb-add-rpm-suggestion-script.patch
@@ -26,7 +26,7 @@ diff --git a/gdb/python/lib/gdb/command/rpm-suggestions.py b/gdb/python/lib/gdb/
 new file mode 100644
 --- /dev/null
 +++ b/gdb/python/lib/gdb/command/rpm-suggestions.py
-@@ -0,0 +1,116 @@
+@@ -0,0 +1,118 @@
 +# Copyright 2023 Free Software Foundation, Inc.
 +
 +# This program is free software; you can redistribute it and/or modify
@@ -42,13 +42,15 @@ new file mode 100644
 +# You should have received a copy of the GNU General Public License
 +# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 +
++import sys
 +import gdb
 +import gdb.missing_debug
 +try:
 +    import rpm
 +except ModuleNotFoundError:
 +    print(
-+        "Unable to load 'rpm' module.  Please install the python3-rpm package."
++        "Unable to load 'rpm' module.  Please install the python3-rpm package.",
++	file=sys.stderr
 +    )
 +else:
 +    # Track all the RPMs suggested during a single debug session so we

diff --git a/gdb.spec b/gdb.spec
index 8889764..9fd356f 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -45,7 +45,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: 11%{?dist}
+Release: 12%{?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.
@@ -926,6 +926,10 @@ fi
 # endif scl
 
 %changelog
+* Tue Jun 18 2024 Kevin Buettner <kevinb@redhat.com> - 14.2-12
+- Revise rpm-suggestions.py script so that message regarding
+  a not-found 'rpm' module is output to stderr.  (RHBZ 2275274)
+
 * Sat Jun 08 2024 Python Maint <python-maint@redhat.com>
 - Rebuilt for Python 3.13
 

                 reply	other threads:[~2026-06-28  0:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178260490384.1.9433010784255281305.rpms-gdb-485076cf4a03@fedoraproject.org \
    --to=kevinb@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox