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 regression on paths shared between a real file/dir and a ghost
Date: Mon, 23 Nov 2026 09:28:06 GMT	[thread overview]
Message-ID: <179542608631.1.5348852019345798307.rpms-rpm-8020bfa4fea4@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/rpm
Branch : pmatilai-v6
Commit : 8020bfa4fea421c9d09b2394da3735e1e23ffe87
Author : Panu Matilainen <pmatilai@redhat.com>
Date   : 2013-01-28T14:03:33+02:00
Stats  : +54/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/rpm/c/8020bfa4fea421c9d09b2394da3735e1e23ffe87?branch=pmatilai-v6

Log:
- fix regression on paths shared between a real file/dir and a ghost

---
diff --git a/rpm-4.11-beta-skip-ghost.patch b/rpm-4.11-beta-skip-ghost.patch
new file mode 100644
index 0000000..e5d8a3b
--- /dev/null
+++ b/rpm-4.11-beta-skip-ghost.patch
@@ -0,0 +1,50 @@
+commit a712252392eca75443ca45c10a72873cabec7963
+Author: Panu Matilainen <pmatilai@redhat.com>
+Date:   Mon Jan 28 12:50:39 2013 +0200
+
+    Be more careful about skipping shared file/directory creation
+    
+    - Only skip shared file/dir creation if its actually being created
+      by another package. Previously we could've decided to skip an entry
+      where the other file was also being skipped for some other reason.
+    - Ensure %ghost entries always have FA_SKIP on install, previously
+      they often were FA_CREATE which makes no sense for %ghost. We dont
+      encounter %ghosts at all during install in the FSM as they dont
+      exist in the payload, but the file disposition calculations need
+      to take them into account now that we're avoiding redundant creates.
+    - Fixes a regression from commit f7f5f88f9f3d6587e747b034ccb64a3f00ff4e1e
+      which unearthed the %ghost FA_CREATE issue, reported here:
+      http://lists.fedoraproject.org/pipermail/buildsys/2013-January/004047.html
+
+diff --git a/lib/transaction.c b/lib/transaction.c
+index 6e9e025..397f23d 100644
+--- a/lib/transaction.c
++++ b/lib/transaction.c
+@@ -572,7 +572,8 @@ assert(otherFi != NULL);
+ 		}
+ 	    } else {
+ 		/* Skip create on all but the first instance of a shared file */
+-		if (rpmfsGetAction(otherFs, otherFileNum) != FA_UNKNOWN)
++		rpmFileAction oaction = rpmfsGetAction(otherFs, otherFileNum);
++		if (oaction != FA_UNKNOWN && !XFA_SKIPPING(oaction))
+ 		    rpmfsSetAction(fs, i, FA_SKIP);
+ 	    }
+ 
+@@ -760,6 +761,17 @@ static void skipInstallFiles(const rpmts ts, rpmte p)
+ 	ix = rpmfiDX(fi);
+ 	drc[ix]++;
+ 
++	/*
++	 * Always skip %ghosts on install.
++	 * XXX: Should we skip directory creation if there are only
++	 * %ghosts in it? Traditionally we create the (empty) directory, so
++	 * preserving that behavior for now at least: leave the refcount alone.
++	 */
++	if (rpmfiFFlags(fi) & RPMFILE_GHOST) {
++	    rpmfsSetAction(fs, i, FA_SKIP);
++	    continue;
++	}
++
+ 	/* Don't bother with skipped files */
+ 	if (XFA_SKIPPING(rpmfsGetAction(fs, i))) {
+ 	    drc[ix]--; dff[ix] = 1;

diff --git a/rpm.spec b/rpm.spec
index 44fc48c..04e2c37 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -46,6 +46,7 @@ Patch5: rpm-4.9.90-armhfp.patch
 Patch6: rpm-4.9.0-armhfp-logic.patch
 
 # Patches already in upstream
+Patch100: rpm-4.11-beta-skip-ghost.patch
 
 # These are not yet upstream
 Patch301: rpm-4.6.0-niagara.patch
@@ -219,6 +220,8 @@ packages on a system.
 %patch3 -p1 -b .no-man-dirs
 %patch4 -p1 -b .use-gpg2
 
+%patch100 -p1 -b .skip-ghost
+
 %patch301 -p1 -b .niagara
 %patch302 -p1 -b .geode
 %patch304 -p1 -b .ldflags
@@ -454,6 +457,7 @@ exit 0
 * Mon Jan 28 2013 Panu Matilainen <pmatilai@redhat.com> - 4.11.0-0.beta1.2
 - armv7hl and armv7hnl should not have -mthumb (#901901)
 - fix duplicate directory ownership between rpm and rpm-build (#894201)
+- fix regression on paths shared between a real file/dir and a ghost
 
 * Mon Dec 10 2012 Panu Matilainen <pmatilai@redhat.com> - 4.11.0-0.beta1.1
 - update to 4.11 beta

                 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=179542608631.1.5348852019345798307.rpms-rpm-8020bfa4fea4@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