diff --git a/rpm-4.13.0-weak-rich-consistency.patch b/rpm-4.13.0-weak-rich-consistency.patch new file mode 100644 index 0000000..71155e1 --- /dev/null +++ b/rpm-4.13.0-weak-rich-consistency.patch @@ -0,0 +1,49 @@ +From 9c1e995043a999dcac05a74aa8bcf934122d40ba Mon Sep 17 00:00:00 2001 +From: Lubos Kardos +Date: Thu, 14 Apr 2016 13:12:51 +0200 +Subject: [PATCH] Make creating index records consistent for rich and rich-weak + deps + +If a package contains a rich require dependency then this rich +dependency is parsed and also subdependencies are stored into the +require index. For example for rich dependency "(A and B)" the whole +string "(A and B)" is stored into the index Requirename but +subdependcies "A" and "B" are stored into index too. Previously this +parsing and storing subdependencies was done only for require rich +dependencies. Now it is done also for weak rich dependecies (suggests, +supplements and recommends). +(rhbz:1325982) +--- + lib/rpmdb.c | 16 +++++++++++++--- + 1 file changed, 13 insertions(+), 3 deletions(-) + +diff --git a/lib/rpmdb.c b/lib/rpmdb.c +index 7992d9c..334c4d9 100644 +--- a/lib/rpmdb.c ++++ b/lib/rpmdb.c +@@ -2342,9 +2342,19 @@ static rpmRC tag2index(dbiIndex dbi, rpmTagVal rpmtag, + + rc += idxupdate(dbi, dbc, key, keylen, &rec); + +- if ((rpmtag == RPMTAG_REQUIRENAME || rpmtag == RPMTAG_CONFLICTNAME) && *(char *)key == '(') { +- if (rpmtdType(&tagdata) == RPM_STRING_ARRAY_TYPE) { +- rc += updateRichDep(dbi, dbc, rpmtdGetString(&tagdata), &rec, idxupdate); ++ if (*(char *)key == '(') { ++ switch (rpmtag) { ++ case RPMTAG_REQUIRENAME: ++ case RPMTAG_CONFLICTNAME: ++ case RPMTAG_SUGGESTNAME: ++ case RPMTAG_SUPPLEMENTNAME: ++ case RPMTAG_RECOMMENDNAME: ++ if (rpmtdType(&tagdata) == RPM_STRING_ARRAY_TYPE) { ++ rc += updateRichDep(dbi, dbc, rpmtdGetString(&tagdata), ++ &rec, idxupdate); ++ } ++ default: ++ break; + } + } + } +-- +1.9.3 + diff --git a/rpm.spec b/rpm.spec index b960b85..34936ac 100644 --- a/rpm.spec +++ b/rpm.spec @@ -29,7 +29,7 @@ Summary: The RPM package management system Name: rpm Version: %{rpmver} -Release: %{?snapver:0.%{snapver}.}29%{?dist} +Release: %{?snapver:0.%{snapver}.}30%{?dist} Group: System Environment/Base Url: http://www.rpm.org/ Source0: http://rpm.org/releases/rpm-4.12.x/%{name}-%{srcver}.tar.bz2 @@ -75,6 +75,7 @@ Patch119: rpm-4.13.0-Noarch-ExclusiveArch.patch Patch120: rpm-4.13.0-redirect2null.patch Patch121: rpm-4.13.0-lang-doc-directives.patch Patch122: rpm-4.13.0-elem-progress-callback.patch +Patch123: rpm-4.13.0-weak-rich-consistency.patch # These are not yet upstream Patch302: rpm-4.7.1-geode-i686.patch @@ -586,6 +587,9 @@ exit 0 %doc doc/librpm/html/* %changelog +* Thu Apr 14 2016 Lubos Kardos 4.13.0-0-rc1.30 +- Make creating index records consistent for rich and rich-weak deps (#1325982) + * Tue Apr 12 2016 Lubos Kardos 4.13.0-0.rc1.29 - Add RPMCALLBACK_ELEM_PROGRESS callback type (needed by dnf)