public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Panu Matilainen <pmatilai@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/rpm] pmatilai-v6: - fix overzealous sanity check breaking posttrans scripts
Date: Mon, 23 Nov 2026 09:27:39 GMT [thread overview]
Message-ID: <179542605913.1.14741849326986992966.rpms-rpm-75a190c34ede@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/rpm
Branch : pmatilai-v6
Commit : 75a190c34edee4f0be842f9a15a472096b98b961
Author : Panu Matilainen <pmatilai@redhat.com>
Date : 2012-03-21T09:18:26+02:00
Stats : +40/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/rpm/c/75a190c34edee4f0be842f9a15a472096b98b961?branch=pmatilai-v6
Log:
- fix overzealous sanity check breaking posttrans scripts
---
diff --git a/rpm-4.9.90-rpmte-fileinfo-2.patch b/rpm-4.9.90-rpmte-fileinfo-2.patch
new file mode 100644
index 0000000..4069909
--- /dev/null
+++ b/rpm-4.9.90-rpmte-fileinfo-2.patch
@@ -0,0 +1,34 @@
+commit 2f20f6e6b2cc6f26794678d1db16659c484a001c
+Author: Panu Matilainen <pmatilai@redhat.com>
+Date: Wed Mar 21 09:07:21 2012 +0200
+
+ Transaction element file info can be legally NULL in some cases
+
+ - rpmteClose() will wipe out the file info to free memory, we only
+ should care whether we failed to (re)load the file info. This
+ thinko in commit 06a2f1269b035a3a76464149834f2a5a8c4e89f2
+ broke %posttrans scriptlets (and without commit
+ 274dbf557d1cac90f7c278f9b6d6af05997d92df, %pretrans in other
+ circumstances), whoopsie *blush*. Now, off to write a test-case
+ for our scriptlet behavior...
+
+diff --git a/lib/rpmte.c b/lib/rpmte.c
+index 65e1e76..65d65af 100644
+--- a/lib/rpmte.c
++++ b/lib/rpmte.c
+@@ -693,11 +693,12 @@ static int rpmteOpen(rpmte te, int reload_fi)
+ }
+ if (h != NULL) {
+ if (reload_fi) {
++ /* This can fail if we get a different, bad header from callback */
+ te->fi = getFI(te, h);
++ rc = (te->fi != NULL);
++ } else {
++ rc = 1;
+ }
+-
+- /* This can fail if we get a different, bad header from callback */
+- rc = (te->fi != NULL);
+
+ rpmteSetHeader(te, h);
+ headerFree(h);
diff --git a/rpm.spec b/rpm.spec
index cf02b9d..8b82b1f 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -22,7 +22,7 @@
Summary: The RPM package management system
Name: rpm
Version: %{rpmver}
-Release: %{?snapver:0.%{snapver}.}3%{?dist}
+Release: %{?snapver:0.%{snapver}.}4%{?dist}
Group: System Environment/Base
Url: http://www.rpm.org/
Source0: http://rpm.org/releases/testing/%{name}-%{srcver}.tar.bz2
@@ -45,6 +45,7 @@ Patch6: rpm-4.9.0-armhfp-logic.patch
# Patches already in upstream
Patch200: rpm-4.9.90-rpmte-fileinfo.patch
+Patch201: rpm-4.9.90-rpmte-fileinfo-2.patch
# These are not yet upstream
Patch301: rpm-4.6.0-niagara.patch
@@ -215,6 +216,7 @@ packages on a system.
%patch4 -p1 -b .use-gpg2
%patch200 -p1 -b .rpmte-fileinfo
+%patch201 -p1 -b .rpmte-fileinfo-2
%patch301 -p1 -b .niagara
%patch302 -p1 -b .geode
@@ -441,6 +443,9 @@ exit 0
%doc COPYING doc/librpm/html/*
%changelog
+* Wed Mar 21 2012 Panu Matilainen <pmatilai@redhat.com> - 4.9.90-0.git11505.4
+- fix overzealous sanity check breaking posttrans scripts
+
* Tue Mar 20 2012 Panu Matilainen <pmatilai@redhat.com> - 4.9.90-0.git11505.3
- fix bad interaction with yum's test-transaction and pretrans scripts
reply other threads:[~2026-11-23 9:27 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=179542605913.1.14741849326986992966.rpms-rpm-75a190c34ede@fedoraproject.org \
--to=pmatilai@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