public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Lubos Kardos <lkardos@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/rpm] pmatilai-v6: - fix "--excludedocs" option
Date: Mon, 23 Nov 2026 09:29:20 GMT	[thread overview]
Message-ID: <179542616007.1.3108261983016842169.rpms-rpm-4b03dd3bed00@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/rpm
            Branch : pmatilai-v6
            Commit : 4b03dd3bed00e68587e38bf9793f843748baf485
            Author : Lubos Kardos <lkardos@redhat.com>
            Date   : 2015-03-20T14:59:59+01:00
            Stats  : +50/-0 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/rpm/c/4b03dd3bed00e68587e38bf9793f843748baf485?branch=pmatilai-v6

            Log:
            - fix "--excludedocs" option
- resolves: #1192625

---
diff --git a/rpm-4.12.0-exclude-doc.patch b/rpm-4.12.0-exclude-doc.patch
new file mode 100644
index 0000000..b28a4a6
--- /dev/null
+++ b/rpm-4.12.0-exclude-doc.patch
@@ -0,0 +1,45 @@
+From b598ce37d76bde5b8a6029008531aba6d2fbf594 Mon Sep 17 00:00:00 2001
+From: Lubos Kardos <lkardos@redhat.com>
+Date: Thu, 12 Mar 2015 15:34:39 +0100
+Subject: [PATCH] Skip directory if contains subdirectory that contains only
+ skipped files.
+
+Previously directory was skipped from installation if it contained only
+skipped files. But it wasn't skipped if it contained some subdirectory.
+Now if subdirectory contains also only skipped files then subdirectory
+and also parent directory are skipped. It is achieved by solving
+subdirectories at first and then solving parent directories.
+(rhbz#1192625)
+---
+ lib/transaction.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/lib/transaction.c b/lib/transaction.c
+index 0f39732..af1deb8 100644
+--- a/lib/transaction.c
++++ b/lib/transaction.c
+@@ -851,7 +851,8 @@ static void skipInstallFiles(const rpmts ts, rpmfiles files, rpmfs fs)
+     }
+ 
+     /* Skip (now empty) directories that had skipped files. */
+-    for (j = 0; j < dc; j++) {
++    /* Iterate over dirs in reversed order to solve subdirs at first */
++    for (j = dc; j >= 0; j--) {
+ 	const char * dn, * bn;
+ 	size_t dnlen, bnlen;
+ 
+@@ -892,6 +893,11 @@ static void skipInstallFiles(const rpmts ts, rpmfiles files, rpmfs fs)
+ 		continue;
+ 	    rpmlog(RPMLOG_DEBUG, "excluding directory %s\n", dn);
+ 	    rpmfsSetAction(fs, i, FA_SKIPNSTATE);
++	    ix = rpmfiDX(fi);
++	    /* Decrease count of files for parent directory */
++	    drc[ix]--;
++	    /* Mark directory because something was removed from them */
++	    dff[ix] = 1;
+ 	    break;
+ 	}
+     }
+-- 
+1.9.3
+

diff --git a/rpm.spec b/rpm.spec
index 3af724a..39a075a 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -59,6 +59,8 @@ Patch102: rpm-4.12.0-archive-endian.patch
 # find-debuginfo.sh fails on ELF with more than 256 notes
 # http://www.rpm.org/ticket/887
 Patch103: 0001-Fix-find-debuginfo.sh-for-ELF-with-file-warnings.patch
+# Fix --excludedocs option (#1192625)
+Patch104: rpm-4.12.0-exclude-doc.patch
 
 # These are not yet upstream
 Patch302: rpm-4.7.1-geode-i686.patch
@@ -543,6 +545,9 @@ exit 0
 %doc doc/librpm/html/*
 
 %changelog
+* Fri Mar 20 2015 Lubos Kardos <lkardos@redhat.com> 4.12.0-10
+- Fix "--excludedocs" option (#1192625)
+
 * Fri Mar 20 2015 Florian Festi <ffesti@rpm.org> - 4.12.0.1-9
 - Fix spec to allow building without plugins (#1182385)
 * Mon Mar 16 2015 Than Ngo <than@redhat.com> - 4.12.0.1-8

                 reply	other threads:[~2026-11-23  9:29 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=179542616007.1.3108261983016842169.rpms-rpm-4b03dd3bed00@fedoraproject.org \
    --to=lkardos@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