public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/fedora-review] f44: Fix crash on RPMs containing no files
Date: Sat, 18 Jul 2026 12:13:50 GMT [thread overview]
Message-ID: <178437683096.1.376636391300541145.rpms-fedora-review-10403eb648e2@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/fedora-review
Branch : f44
Commit : 10403eb648e2babb47cc4c561b1ef71c68a6f363
Author : Ondrej Mosnáček <omosnacek@gmail.com>
Date : 2026-07-16T10:20:39+02:00
Stats : +50/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/fedora-review/c/10403eb648e2babb47cc4c561b1ef71c68a6f363?branch=f44
Log:
Fix crash on RPMs containing no files
I'm being affected by this bug, so I'd like to have it fixed in the
Fedora package.
Signed-off-by: Ondrej Mosnáček <omosnacek@gmail.com>
---
diff --git a/001-fix-emtpy-rpms.patch b/001-fix-emtpy-rpms.patch
new file mode 100644
index 0000000..3986465
--- /dev/null
+++ b/001-fix-emtpy-rpms.patch
@@ -0,0 +1,44 @@
+From 59fcbea176197a03206cc43f439da96e9507d912 Mon Sep 17 00:00:00 2001
+From: Peter Lemenkov <lemenkov@gmail.com>
+Date: Thu, 19 Mar 2026 16:37:45 +0100
+Subject: [PATCH] [PATCH] Fix crash on RPMs containing no files
+
+When `rpm -ql --dump` is run against a package with no files, it outputs
+`"(contains no files)"` instead of the expected dump format. The regex
+search returns None, and calling `.start()` on None raises
+`AttributeError`.
+
+The existing except clause only catches `ValueError`, so the
+`AttributeError` propagates up and crashes fedora-review.
+
+Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
+Assisted-by: Claude (Anthropic) <https://claude.ai>
+---
+ src/FedoraReview/deps.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/FedoraReview/deps.py b/src/FedoraReview/deps.py
+index 1cf6033..0328f27 100644
+--- a/src/FedoraReview/deps.py
++++ b/src/FedoraReview/deps.py
+@@ -227,7 +227,7 @@ def list_dirs(pkg_filename):
+ first_number_start = first_number_match.start()
+ path = line[:first_number_start].strip()
+ mode = line[first_number_start:].rsplit(None, 10)[3:4][0]
+- except ValueError:
++ except (ValueError, AttributeError):
+ # E. g., when given '(contains no files)'
+ continue
+ mode = int(mode, 8)
+@@ -349,7 +349,7 @@ def listpaths(pkg_filename):
+ first_number_start = first_number_match.start()
+ path = line[:first_number_start].strip()
+ mode = line[first_number_start:].rsplit(None, 10)[3:4][0]
+- except ValueError:
++ except (ValueError, AttributeError):
+ # E. g., when given '(contains no files)'
+ continue
+ mode = int(mode, 8)
+--
+2.54.0
+
diff --git a/fedora-review.spec b/fedora-review.spec
index a900c9f..4d93eae 100644
--- a/fedora-review.spec
+++ b/fedora-review.spec
@@ -14,13 +14,15 @@
Name: fedora-review
Version: 0.11.0
-Release: 5%{?build_nr}%{?git_tag}%{?dist}
+Release: 6%{?build_nr}%{?git_tag}%{?dist}
Summary: Review tool for fedora rpm packages
License: GPL-2.0-or-later
URL: https://pagure.io/FedoraReview
Source0: https://releases.pagure.org/FedoraReview/fedora_review-%{version}%{?git_tag}.tar.gz
+Patch: https://forge.fedoraproject.org/packaging/FedoraReview/pulls/546.patch#/001-fix-emtpy-rpms.patch
+
BuildArch: noarch
BuildRequires: mock >= 3.0
@@ -154,6 +156,9 @@ mock --quiet -r fedora-38-x86_64 --uniqueext=hugo --init
%changelog
+* Thu Jul 16 2026 Ondrej Mosnáček <omosnacek@gmail.com> - 0.11.0-6
+- Fix crash on RPMs containing no files
+
* Wed Jul 15 2026 Fedora Release Engineering <releng@fedoraproject.org> - 0.11.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
reply other threads:[~2026-07-18 12:13 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=178437683096.1.376636391300541145.rpms-fedora-review-10403eb648e2@fedoraproject.org \
--to=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