From 56c3634cfab9fee5619cafb3da43745c2d0e3e8b Mon Sep 17 00:00:00 2001 From: ewt Date: Sun, 26 Oct 1997 16:42:44 +0000 Subject: [PATCH] ignore missing entries in requires database CVS patchset: 1871 CVS date: 1997/10/26 16:42:44 --- CHANGES | 1 + lib/rpmdb.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 76bd23e..e761aef 100644 --- a/CHANGES +++ b/CHANGES @@ -8,6 +8,7 @@ - make mips compatible with noarch - fixed bug w/ printing string arrays in conditionals - handle modern patch programs (> 2.1) + - handle packages w/ duplicate dependency names 2.4.7 -> 2.4.8: - added noarch build compatibilities for ppc, m68k diff --git a/lib/rpmdb.c b/lib/rpmdb.c index 7b36e0f..f196d22 100644 --- a/lib/rpmdb.c +++ b/lib/rpmdb.c @@ -376,11 +376,15 @@ int rpmdbRemove(rpmdb db, unsigned int offset, int tolerant) { if (headerGetEntry(h, RPMTAG_REQUIRENAME, &type, (void **) &requiredbyList, &count)) { + /* There could be dups in requiredByLIst, and the list is sorted. + Rather then sort the list, be tolerant of missing entries + as they should just indicate duplicated requirements. */ + for (i = 0; i < count; i++) { rpmMessage(RPMMESS_DEBUG, "removing requiredby index for %s\n", requiredbyList[i]); removeIndexEntry(db->requiredbyIndex, requiredbyList[i], rec, - tolerant, "requiredby index"); + 1, "requiredby index"); } free(requiredbyList); } -- 2.7.4