build/reqprov.c (compare_deps): promote Epoch by giving it special treatment
If one of deps has Epoch and another one hasn't, we first compare them without Epoch, and if it happens that they are equal, then the dep that has Epoch wins.
This commit is contained in:
parent
7b9d0f53d1
commit
525389d128
@ -208,13 +208,13 @@ compare_deps (rpmTag tag, const char *Aevr, rpmsenseFlags Aflags,
|
|||||||
parseEVR(bEVR, &bE, &bV, &bR);
|
parseEVR(bEVR, &bE, &bV, &bR);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* When comparing deps whose senses are identical, Epoch needs
|
* Promote Epoch by giving it special treatment:
|
||||||
* special treatment: if one of deps has Epoch and another one
|
* if one of deps has Epoch and another one hasn't,
|
||||||
* hasn't, we first compare them without Epoch, and if it
|
* we first compare them without Epoch, and if it happens
|
||||||
* happens that they are equal, the dep that has Epoch wins.
|
* that they are equal, then the dep that has Epoch wins.
|
||||||
*/
|
*/
|
||||||
const char *ae = aE, *be = bE;
|
const char *ae = aE, *be = bE;
|
||||||
if (Asense == Bsense && (!(aE && *aE) || !(bE && *bE)))
|
if ((!(aE && *aE) || !(bE && *bE)))
|
||||||
ae = NULL; be = NULL;
|
ae = NULL; be = NULL;
|
||||||
|
|
||||||
sense = rpmEVRcmp(ae, aV, aR, Aevr, be, bV, bR, Bevr);
|
sense = rpmEVRcmp(ae, aV, aR, Aevr, be, bV, bR, Bevr);
|
||||||
|
Loading…
Reference in New Issue
Block a user