summaryrefslogtreecommitdiff
path: root/lib/depends.c
diff options
context:
space:
mode:
authorjbj <devnull@localhost>1999-09-20 13:23:46 +0000
committerjbj <devnull@localhost>1999-09-20 13:23:46 +0000
commitaa8b92fedffeed174157fee39090dcb78611ac5a (patch)
tree1b1850763fcf963e3c9551d74a57aa5aec6fe5b1 /lib/depends.c
parent86aa4396e54fd9b56590fb1af56079154f54b7ed (diff)
downloadlibrpm-tizen-aa8b92fedffeed174157fee39090dcb78611ac5a.tar.gz
librpm-tizen-aa8b92fedffeed174157fee39090dcb78611ac5a.tar.bz2
librpm-tizen-aa8b92fedffeed174157fee39090dcb78611ac5a.zip
Skip provides along for the ride.
CVS patchset: 3308 CVS date: 1999/09/20 13:23:46
Diffstat (limited to 'lib/depends.c')
-rw-r--r--lib/depends.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/depends.c b/lib/depends.c
index 93e5e9567..87f61e44c 100644
--- a/lib/depends.c
+++ b/lib/depends.c
@@ -335,6 +335,7 @@ static int rangesOverlap(const char *AName, const char *AEVR, int AFlags,
parseEVR(bEVR, &bE, &bV, &bR);
/* Compare {A,B} [epoch:]version[-release] */
+ sense = 0;
if (aE && *aE && bE && *bE)
sense = rpmvercmp(aE, bE);
else if (aE && *aE)
@@ -692,8 +693,14 @@ static /*@exposed@*/ struct availablePackage * alSatisfiesDepend(struct availabl
} break;
case IET_PROVIDES:
for (i = 0; i < p->providesCount; i++) {
- const char *proEVR = (p->providesEVR ? p->providesEVR[i] : NULL);
- int proFlags = (p->provideFlags ? p->provideFlags[i] : 0);
+ const char *proEVR;
+ int proFlags;
+
+ /* Filter out provides that came along for the ride. */
+ if (strcmp(p->provides[i], keyName)) continue;
+
+ proEVR = (p->providesEVR ? p->providesEVR[i] : NULL);
+ proFlags = (p->provideFlags ? p->provideFlags[i] : 0);
rc = rangesOverlap(p->provides[i], proEVR, proFlags,
keyName, keyEVR, keyFlags);
if (rc) break;