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 +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 4.12.0-10 +- Fix "--excludedocs" option (#1192625) + * Fri Mar 20 2015 Florian Festi - 4.12.0.1-9 - Fix spec to allow building without plugins (#1182385) * Mon Mar 16 2015 Than Ngo - 4.12.0.1-8