public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rpm] pmatilai-v6: - fix "--excludedocs" option
@ 2026-11-23 9:29 Lubos Kardos
0 siblings, 0 replies; only message in thread
From: Lubos Kardos @ 2026-11-23 9:29 UTC (permalink / raw)
To: git-commits
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-23 9:29 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:29 [rpms/rpm] pmatilai-v6: - fix "--excludedocs" option Lubos Kardos
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox