{ POOL_FLAG_IMPLICITOBSOLETEUSESPROVIDES, "implicitobsoleteusesprovides", 0 },
{ POOL_FLAG_OBSOLETEUSESCOLORS, "obsoleteusescolors", 0 },
{ POOL_FLAG_NOINSTALLEDOBSOLETES, "noinstalledobsoletes", 0 },
+ { POOL_FLAG_HAVEDISTEPOCH, "havedistepoch", 0 },
{ 0, 0, 0 }
};
return 0;
if (r1 && r2)
{
- if (mode != EVRCMP_MATCH || (s1 != ++r1 && s2 != ++r2))
- r = solv_vercmp(r1, s1, r2, s2);
+ r1++;
+ r2++;
+ if (mode != EVRCMP_MATCH || (s1 != r1 && s2 != r2))
+ {
+ if (pool->havedistepoch)
+ {
+ const char *d1, *d2;
+ for (d1 = r1; d1 < s1; d1++)
+ if (*d1 == ':')
+ break;
+ for (d2 = r2; d2 < s2; d2++)
+ if (*d2 == ':')
+ break;
+ /* XXX: promote just in one direction? */
+ r = solv_vercmp(r1, d1 ? d1 : s1, r2, d2 ? d2 : s2);
+ if (r == 0 && d1 < s1 && d2 < s2)
+ r = solv_vercmp(d1 + 1, s1, d2 + 1, s2);
+ }
+ else
+ r = solv_vercmp(r1, s1, r2, s2);
+ }
}
else if (mode == EVRCMP_MATCH_RELEASE)
{
#ifdef LIBSOLV_INTERNAL
/* flags to tell the library how the installed package manager works */
int promoteepoch; /* true: missing epoch is replaced by epoch of dependency */
+ int havedistepoch; /* true: thr release part in the evr may contain a distepoch suffix */
int obsoleteusesprovides; /* true: obsoletes are matched against provides, not names */
int implicitobsoleteusesprovides; /* true: implicit obsoletes due to same name are matched against provides, not names */
int obsoleteusescolors; /* true: obsoletes check arch color */
#define POOL_FLAG_IMPLICITOBSOLETEUSESPROVIDES 4
#define POOL_FLAG_OBSOLETEUSESCOLORS 5
#define POOL_FLAG_NOINSTALLEDOBSOLETES 6
+#define POOL_FLAG_HAVEDISTEPOCH 7
/* ----------------------------------------------- */