al.c: optimize out rpmRangesOverlap call for unversioned dependencies
This commit is contained in:
parent
09751027bf
commit
7f0aa5d96d
23
lib/al.c
23
lib/al.c
@ -320,16 +320,19 @@ alAllSatisfiesDepend(const availableList al,
|
||||
}
|
||||
if (already)
|
||||
continue;
|
||||
int provIx = pe->provIx;
|
||||
const char *provName = alp->provides[provIx];
|
||||
const char *provEVR = alp->providesEVR ? alp->providesEVR[provIx] : NULL;
|
||||
int provFlags = alp->provideFlags ? alp->provideFlags[provIx] : 0;
|
||||
if ((keyFlags & RPMSENSE_SENSEMASK) && !(provFlags & RPMSENSE_SENSEMASK))
|
||||
provFlags |= RPMSENSE_EQUAL;
|
||||
int rc = rpmRangesOverlap(provName, provEVR, provFlags,
|
||||
keyName, keyEVR, keyFlags);
|
||||
if (rc == 0)
|
||||
continue;
|
||||
if ((keyFlags & RPMSENSE_SENSEMASK)) {
|
||||
const char *provName = pe->name;
|
||||
const char *provEVR = alp->providesEVR ?
|
||||
alp->providesEVR[pe->provIx] : NULL;
|
||||
int provFlags = alp->provideFlags ?
|
||||
alp->provideFlags[pe->provIx] : 0;
|
||||
if (!(provFlags & RPMSENSE_SENSEMASK))
|
||||
provFlags |= RPMSENSE_EQUAL; /* ALT21-139-g6cb9a9a */
|
||||
int rc = rpmRangesOverlap(provName, provEVR, provFlags,
|
||||
keyName, keyEVR, keyFlags);
|
||||
if (rc == 0)
|
||||
continue;
|
||||
}
|
||||
ret = xrealloc(ret, (found + 2) * sizeof(*ret));
|
||||
ret[found++] = alp;
|
||||
}
|
||||
|
@ -212,7 +212,7 @@ static int rangeMatchesDepFlags (Header h,
|
||||
continue;
|
||||
|
||||
if (!(provideFlags[i] & RPMSENSE_SENSEMASK))
|
||||
provideFlags[i] |= RPMSENSE_EQUAL;
|
||||
provideFlags[i] |= RPMSENSE_EQUAL; /* ALT21-139-g6cb9a9a */
|
||||
result = rpmRangesOverlap(provides[i], providesEVR[i], provideFlags[i],
|
||||
reqName, reqEVR, reqFlags);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user