Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP5:Update
python3-rpm
nameversioncompare.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File nameversioncompare.diff of Package python3-rpm
Also compare the name and not only the version when checking if two packages are the same. rh#104066 --- ./lib/depends.c.orig 2012-06-01 10:07:12.000000000 +0000 +++ ./lib/depends.c 2012-06-01 10:16:13.000000000 +0000 @@ -144,6 +144,24 @@ static int skipColor(rpm_color_t tscolor return tscolor && color && ocolor && !(color & ocolor); } +static int rpmNameVersionCompare(Header first, Header second) +{ + const char * one, * two; + int rc; + + one = headerGetString(first, RPMTAG_NAME); + two = headerGetString(second, RPMTAG_NAME); + rc = strcmp(one, two); + if (rc) + return rc; + one = headerGetString(first, RPMTAG_ARCH); + two = headerGetString(second, RPMTAG_ARCH); + rc = strcmp(one, two); + if (rc) + return rc; + return rpmVersionCompare(first, second); +} + /* Add erase elements for older packages of same color (if any). */ static int addUpgradeErasures(rpmts ts, rpm_color_t tscolor, rpmte p, rpm_color_t hcolor, Header h) @@ -157,8 +175,8 @@ static int addUpgradeErasures(rpmts ts, if (skipColor(tscolor, hcolor, headerGetNumber(oh, RPMTAG_HEADERCOLOR))) continue; - /* Skip packages that contain identical NEVR. */ - if (rpmVersionCompare(h, oh) == 0) + /* Skip packages that contain identical NEVRA. */ + if (rpmNameVersionCompare(h, oh) == 0) continue; if (removePackage(ts, oh, p)) {
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor