public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rpm] pmatilai-v6: - fully reset file actions between rpmtsRun() calls (#1076552)
@ 2026-11-23  9:28 Panu Matilainen
  0 siblings, 0 replies; only message in thread
From: Panu Matilainen @ 2026-11-23  9:28 UTC (permalink / raw)
  To: git-commits

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)

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-23  9:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-23  9:28 [rpms/rpm] pmatilai-v6: - fully reset file actions between rpmtsRun() calls (#1076552) Panu Matilainen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox