2006-12-19 00:17:44 +01:00
|
|
|
Also compare the name and not only the version when checking if
|
|
|
|
two packages are the same. rh#104066
|
|
|
|
|
2011-05-16 18:07:44 +02:00
|
|
|
--- ./lib/depends.c.orig 2011-05-12 12:20:01.000000000 +0000
|
|
|
|
+++ ./lib/depends.c 2011-05-12 12:26:25.000000000 +0000
|
|
|
|
@@ -95,6 +95,24 @@ static rpmdbMatchIterator rpmtsPrunedIte
|
|
|
|
return mi;
|
2006-12-19 00:17:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
+static int rpmNameVersionCompare(Header first, Header second)
|
|
|
|
+{
|
|
|
|
+ const char * one, * two;
|
|
|
|
+ int rc;
|
|
|
|
+
|
2011-05-16 18:07:44 +02:00
|
|
|
+ one = headerGetString(first, RPMTAG_NAME);
|
|
|
|
+ two = headerGetString(second, RPMTAG_NAME);
|
2006-12-19 00:17:44 +01:00
|
|
|
+ rc = strcmp(one, two);
|
|
|
|
+ if (rc)
|
|
|
|
+ return rc;
|
2011-05-16 18:07:44 +02:00
|
|
|
+ one = headerGetString(first, RPMTAG_ARCH);
|
|
|
|
+ two = headerGetString(second, RPMTAG_ARCH);
|
2006-12-19 00:17:44 +01:00
|
|
|
+ rc = strcmp(one, two);
|
|
|
|
+ if (rc)
|
|
|
|
+ return rc;
|
|
|
|
+ return rpmVersionCompare(first, second);
|
|
|
|
+}
|
|
|
|
+
|
2011-05-16 18:07:44 +02:00
|
|
|
#define skipColor(_tscolor, _color, _ocolor) \
|
|
|
|
((_tscolor) && (_color) && (_ocolor) && !((_color) & (_ocolor)))
|
|
|
|
|
|
|
|
@@ -111,7 +129,7 @@ static void addUpgradeErasures(rpmts ts,
|
2006-12-19 00:17:44 +01:00
|
|
|
continue;
|
|
|
|
|
|
|
|
/* Skip packages that contain identical NEVR. */
|
|
|
|
- if (rpmVersionCompare(h, oh) == 0)
|
|
|
|
+ if (rpmNameVersionCompare(h, oh) == 0)
|
|
|
|
continue;
|
|
|
|
|
2011-05-16 18:07:44 +02:00
|
|
|
removePackage(ts, oh, p);
|
|
|
|
@@ -150,7 +168,7 @@ static void addObsoleteErasures(rpmts ts
|
2006-12-19 00:17:44 +01:00
|
|
|
* If no obsoletes version info is available, match all names.
|
|
|
|
*/
|
|
|
|
if (rpmdsEVR(obsoletes) == NULL
|
2011-05-16 18:07:44 +02:00
|
|
|
- || rpmdsAnyMatchesDep(oh, obsoletes, _rpmds_nopromote)) {
|
|
|
|
+ || rpmdsNVRMatchesDep(oh, obsoletes, _rpmds_nopromote)) {
|
2010-03-26 11:56:28 +01:00
|
|
|
char * ohNEVRA = headerGetAsString(oh, RPMTAG_NEVRA);
|
2009-08-28 15:54:03 +02:00
|
|
|
rpmlog(RPMLOG_DEBUG, " Obsoletes: %s\t\terases %s\n",
|
|
|
|
rpmdsDNEVR(obsoletes)+2, ohNEVRA);
|