This isn't the right fix:

Index: lib/query.c
===================================================================
RCS file: /v/rpm/cvs/rpm/lib/query.c,v
retrieving revision 2.215.2.2
retrieving revision 2.215.2.3
diff -p -u -w -r2.215.2.2 -r2.215.2.3
--- lib/query.c 22 Dec 2010 22:39:04 -0000      2.215.2.2
+++ lib/query.c 8 Jan 2011 20:31:46 -0000       2.215.2.3
@@ -692,12 +692,13 @@ int rpmQueryVerify(QVA_t qva, rpmts ts, 
        }

        qva->qva_mi = rpmtsInitIterator(ts, RPMTAG_FILEPATHS, fn, 0);
-       if (qva->qva_mi == NULL && !provides_checked && !gotpattern)
+       if (qva->qva_mi == NULL && !provides_checked && !gotpattern) {
            qva->qva_mi = rpmtsInitIterator(ts, RPMTAG_PROVIDENAME, fn, 0);
 #if defined(RPM_VENDOR_MANDRIVA)
        if(rpmmiCount(qva->qva_mi) == 0)
            qva->qva_mi = rpmmiFree(qva->qva_mi);
 #endif
+       }

        if (qva->qva_mi == NULL) {
            struct stat sb;

Well yes, you need the curlies in the right place, but
you should NOT have to call rpmmmiCount() to detect
whether a Provides: is not present.

(aside)
The real flaw is that RPM needs to FORBID insanities like
        Provides: /path/to/file
Looking in multiple indices, and in multiple databases, just because
some idiot decided to smoke some crack about
        Provides: /path/to/file
and invent stories why Newer! Better! Bestest! is needed. It is NEVER
correct to add data values in multiple places.

73 de Jeff
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
Developer Communication List                        rpm-devel@rpm5.org

Reply via email to