summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2020-02-20 14:48:56 +0100
committerPanu Matilainen <pmatilai@redhat.com>2020-02-24 11:54:22 +0200
commit6f9426c501110e69e940099848d6d8fbfb483bed (patch)
tree67f992fff3bb6f68da7eebeb92ca300a8d110515
parente2f0fbcc29b4b8610009ca5b5937716a592ee0f5 (diff)
downloadrpm-6f9426c501110e69e940099848d6d8fbfb483bed.tar.gz
Get rid of id->str->id roundtrips in rpmalAllFileSatisfiesDepend()
We already know the ids, so just use them for fingerprinting.
-rw-r--r--lib/rpmal.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/rpmal.c b/lib/rpmal.c
index ca7ab053e..be3bd1397 100644
--- a/lib/rpmal.c
+++ b/lib/rpmal.c
@@ -421,8 +421,8 @@ static rpmte * rpmalAllFileSatisfiesDepend(const rpmal al, const char *fileName,
rpmsid dirName = rpmstrPoolIdn(al->pool, fileName, bnStart, 1);
if (!al->fpc)
- al->fpc = fpCacheCreate(1001, NULL);
- fpLookup(al->fpc, rpmstrPoolStr(al->pool, dirName), fileName + bnStart, &fp);
+ al->fpc = fpCacheCreate(1001, al->pool);
+ fpLookupId(al->fpc, dirName, baseName, &fp);
for (found = i = 0; i < resultCnt; i++) {
availablePackage alp = al->list + result[i].pkgNum;
@@ -432,7 +432,7 @@ static rpmte * rpmalAllFileSatisfiesDepend(const rpmal al, const char *fileName,
if (filterds && rpmteDS(alp->p, rpmdsTagN(filterds)) == filterds)
continue;
if (result[i].dirName != dirName &&
- !fpLookupEquals(al->fpc, fp, rpmstrPoolStr(al->pool, result[i].dirName), fileName + bnStart))
+ !fpLookupEqualsId(al->fpc, fp, result[i].dirName, baseName))
continue;
ret[found] = alp->p;