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: - fully reset file actions between rpmtsRun() calls (#1076552)
Date: Mon, 23 Nov 2026 09:28:39 GMT [thread overview]
Message-ID: <179542611993.1.6370216021730048824.rpms-rpm-600ff28b8ea0@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/rpm
Branch : pmatilai-v6
Commit : 600ff28b8ea0d44bfead53ddd77fbb7c29fcb5ec
Author : Panu Matilainen <pmatilai@redhat.com>
Date : 2014-03-26T11:19:55+02:00
Stats : +61/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/rpm/c/600ff28b8ea0d44bfead53ddd77fbb7c29fcb5ec?branch=pmatilai-v6
Log:
- fully reset file actions between rpmtsRun() calls (#1076552)
---
diff --git a/rpm-4.11.x-reset-fileactions.patch b/rpm-4.11.x-reset-fileactions.patch
new file mode 100644
index 0000000..cf67f6b
--- /dev/null
+++ b/rpm-4.11.x-reset-fileactions.patch
@@ -0,0 +1,58 @@
+diff --git a/lib/rpmfs.c b/lib/rpmfs.c
+index 764618d..916f6eb 100644
+--- a/lib/rpmfs.c
++++ b/lib/rpmfs.c
+@@ -18,7 +18,7 @@ rpmfs rpmfsNew(rpm_count_t fc, int initState)
+ rpmfs fs = xcalloc(1, sizeof(*fs));
+ fs->fc = fc;
+ fs->actions = xmalloc(fs->fc * sizeof(*fs->actions));
+- memset(fs->actions, FA_UNKNOWN, fs->fc * sizeof(*fs->actions));
++ rpmfsResetActions(fs);
+ if (initState) {
+ fs->states = xmalloc(sizeof(*fs->states) * fs->fc);
+ memset(fs->states, RPMFILE_STATE_NORMAL, fs->fc);
+@@ -115,3 +115,10 @@ void rpmfsSetAction(rpmfs fs, unsigned int ix, rpmFileAction action)
+ fs->actions[ix] = action;
+ }
+ }
++
++void rpmfsResetActions(rpmfs fs)
++{
++ if (fs && fs->actions) {
++ memset(fs->actions, FA_UNKNOWN, fs->fc * sizeof(*fs->actions));
++ }
++}
+diff --git a/lib/rpmfs.h b/lib/rpmfs.h
+index 5f74753..83f99d1 100644
+--- a/lib/rpmfs.h
++++ b/lib/rpmfs.h
+@@ -57,6 +57,9 @@ rpmFileAction rpmfsGetAction(rpmfs fs, unsigned int ix);
+ RPM_GNUC_INTERNAL
+ void rpmfsSetAction(rpmfs fs, unsigned int ix, rpmFileAction action);
+
++RPM_GNUC_INTERNAL
++void rpmfsResetActions(rpmfs fs);
++
+ #ifdef __cplusplus
+ }
+ #endif
+diff --git a/lib/transaction.c b/lib/transaction.c
+index 02badc6..09c199a 100644
+--- a/lib/transaction.c
++++ b/lib/transaction.c
+@@ -1323,11 +1323,14 @@ static int rpmtsPrepare(rpmts ts)
+
+ rpmlog(RPMLOG_DEBUG, "computing %" PRIu64 " file fingerprints\n", fileCount);
+
+- /* Skip netshared paths, not our i18n files, and excluded docs */
++ /* Reset actions, set skip for netshared paths and excluded files */
+ pi = rpmtsiInit(ts);
+ while ((p = rpmtsiNext(pi, 0)) != NULL) {
+ if (rpmfiFC(rpmteFI(p)) == 0)
+ continue;
++ /* Ensure clean state, this could get called more than once. */
++ rpmfs fs = rpmteGetFileStates(p);
++ rpmfsResetActions(fs);
+ if (rpmteType(p) == TR_ADDED) {
+ skipInstallFiles(ts, p);
+ } else {
diff --git a/rpm.spec b/rpm.spec
index 4de1858..f46fd73 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -57,6 +57,7 @@ Patch10: rpm-4.11.2-double-separator-warning.patch
Patch100: rpm-4.11.x-filter-soname-deps.patch
Patch101: rpm-4.11.x-do-not-filter-ld64.patch
Patch102: rpm-4.11.2-macro-newlines.patch
+Patch103: rpm-4.11.x-reset-fileactions.patch
# These are not yet upstream
Patch301: rpm-4.6.0-niagara.patch
@@ -263,6 +264,7 @@ packages on a system.
%patch100 -p1 -b .filter-soname-deps
%patch101 -p1 -b .dont-filter-ld64
%patch102 -p1 -b .macro-newlines
+%patch103 -p1 -b .reset-fileactions
%patch301 -p1 -b .niagara
%patch302 -p1 -b .geode
@@ -523,6 +525,7 @@ exit 0
%changelog
* Wed Mar 26 2014 Panu Matilainen <pmatilai@redhat.com> - 4.11.2-3
- dont eat newlines on parametrized macro invocations (#1045723)
+- fully reset file actions between rpmtsRun() calls (#1076552)
* Tue Feb 18 2014 Panu Matilainen <pmatilai@redhat.com> - 4.11.2-2
- reduce the double separator spec parse error into a warning (#1065563)
reply other threads:[~2026-11-23 9:28 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=179542611993.1.6370216021730048824.rpms-rpm-600ff28b8ea0@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