Sophie

Sophie

distrib > Mandriva > 2008.0 > x86_64 > by-pkgid > a35732d620cfac4812adc8d6b2992f07 > files > 46

rpm-4.4.8-22.1mdv2008.0.src.rpm

--- rpm-4.4.8/rpmdb/rpmdb.c.pix	2007-01-21 16:30:14.000000000 +0100
+++ rpm-4.4.8/rpmdb/rpmdb.c	2007-08-29 13:49:46.000000000 +0200
@@ -3453,7 +3453,8 @@ exit:
 
 /* XXX transaction.c */
 /*@-compmempass@*/
-int rpmdbFindFpList(rpmdb db, fingerPrint * fpList, dbiIndexSet * matchList, 
+int rpmdbFindList(rpmdb db, const char ** search_dirNames,
+		    const char ** search_baseNames, const uint_32 * search_dirIndexes, dbiIndexSet * matchList, 
 		    int numItems)
 {
 DBT * key;
@@ -3482,7 +3483,7 @@ data = &mi->mi_data;
 /*@=boundswrite@*/
 
 /*@-boundsread -dependenttrans@*/
-key->data = (void *) fpList[i].baseName;
+key->data = (void *) search_baseNames[i];
 /*@=boundsread =dependenttrans@*/
 key->size = strlen((char *)key->data);
 if (key->size == 0) key->size++;	/* XXX "/" fixup. */
@@ -3509,7 +3510,6 @@ if (key->size == 0) key->size++;	/* XXX 
 	rpmTagType bnt, dnt;
 	uint_32 * dirIndexes;
 	uint_32 * fullDirIndexes;
-	fingerPrint * fps;
 	dbiIndexItem im;
 	int start;
 	int num;
@@ -3541,21 +3541,19 @@ if (key->size == 0) key->size++;	/* XXX 
 	}
 /*@=bounds@*/
 
-	fps = xcalloc(num, sizeof(*fps));
-	fpLookupList(fpc, dirNames, baseNames, dirIndexes, num, fps);
-
 	/* Add db (recnum,filenum) to list for fingerprint matches. */
 /*@-boundsread@*/
 	for (i = 0; i < num; i++, im++) {
-	    /*@-nullpass@*/ /* FIX: fpList[].subDir may be NULL */
-	    if (!FP_EQUAL(fps[i], fpList[im->fpNum]))
+	    char *subDir = dirNames[dirIndexes[i]];
+	    char *baseName = baseNames[i];
+
+	    if (strcmp(subDir, search_dirNames[search_dirIndexes[im->fpNum]]) != 0)
 		/*@innercontinue@*/ continue;
 	    /*@=nullpass@*/
 	    xx = dbiAppendSet(matchList[im->fpNum], im, 1, sizeof(*im), 0);
 	}
 /*@=boundsread@*/
 
-	fps = _free(fps);
 	dirNames = hfd(dirNames, dnt);
 	fullBaseNames = hfd(fullBaseNames, bnt);
 	baseNames = _free(baseNames);
--- rpm-4.4.8/rpmdb/librpmdb.vers.pix	2007-01-16 00:30:48.000000000 +0100
+++ rpm-4.4.8/rpmdb/librpmdb.vers	2007-08-29 13:36:26.000000000 +0200
@@ -45,7 +45,7 @@ LIBRPMDB_0
     rpmdbBlockDBI;
     rpmdbCloseDBI;
     rpmdbCountPackages;
-    rpmdbFindFpList;
+    rpmdbFindList;
     rpmdbFreeIterator;
     rpmdbGetIteratorCount;
     rpmdbGetIteratorFileNum;
--- rpm-4.4.8/rpmdb/fprint.h.pix	2007-01-13 20:50:45.000000000 +0100
+++ rpm-4.4.8/rpmdb/fprint.h	2007-08-29 13:28:12.000000000 +0200
@@ -77,7 +77,8 @@ extern "C" {
  * @param numItems	number of fingerprint items
  * @return		0 always
  */
-int rpmdbFindFpList(/*@null@*/ rpmdb db, fingerPrint  * fpList,
+int rpmdbFindList(/*@null@*/ rpmdb db, const char ** dirNames, 
+		  const char ** baseNames, const uint_32 * dirIndexes, 
 		/*@out@*/ dbiIndexSet * matchList, int numItems)
 	/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
 	/*@modifies db, *matchList, rpmGlobalMacroContext,
--- rpm-4.4.8/lib/transaction.c.pix	2007-08-28 18:08:50.000000000 +0200
+++ rpm-4.4.8/lib/transaction.c	2007-08-29 13:28:35.000000000 +0200
@@ -1970,7 +1970,7 @@ rpmMessage(RPMMESS_DEBUG, _("computing f
 	(void) rpmswEnter(rpmtsOp(ts, RPMTS_OP_FINGERPRINT), 0);
 	/* Extract file info for all files in this package from the database. */
 	matches = xcalloc(fc, sizeof(*matches));
-	if (rpmdbFindFpList(rpmtsGetRdb(ts), fi->fps, matches, fc)) {
+	if (rpmdbFindList(rpmtsGetRdb(ts), fi->dnl, fi->bnl, fi->dil, matches, fc)) {
 	    ps = rpmpsFree(ps);
 	    lock = rpmtsFreeLock(lock);
 	    return 1;	/* XXX WTFO? */