public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rpm] pmatilai-v6: - Make creating index records consistent for rich and rich-weak deps
@ 2026-11-23  9:30 Lubos Kardos
  0 siblings, 0 replies; only message in thread
From: Lubos Kardos @ 2026-11-23  9:30 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/rpm
            Branch : pmatilai-v6
            Commit : ea526e71ec8f25bdce8c25032444aa965c52eefb
            Author : Lubos Kardos <lkardos@redhat.com>
            Date   : 2016-04-14T13:50:52+02:00
            Stats  : +54/-1 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/rpm/c/ea526e71ec8f25bdce8c25032444aa965c52eefb?branch=pmatilai-v6

            Log:
            - Make creating index records consistent for rich and rich-weak deps
- Resolves: #1325982

---
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 <lkardos@redhat.com>
+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 <lkardos@redhat.com> 4.13.0-0-rc1.30
+- Make creating index records consistent for rich and rich-weak deps (#1325982)
+
 * Tue Apr 12 2016 Lubos Kardos <lkardos@redhat.com> 4.13.0-0.rc1.29
 - Add RPMCALLBACK_ELEM_PROGRESS callback type (needed by dnf)
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-23  9:30 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:30 [rpms/rpm] pmatilai-v6: - Make creating index records consistent for rich and rich-weak deps Lubos Kardos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox