Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:lpato:sll7
yum
BZ-1564747-gracefully-handle-reinstall-self-con...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File BZ-1564747-gracefully-handle-reinstall-self-conflicts.patch of Package yum
diff --git a/yum/__init__.py b/yum/__init__.py index 56f8c8c4..cf9b68bd 100644 --- a/yum/__init__.py +++ b/yum/__init__.py @@ -6745,7 +6745,23 @@ much more problems). # Newer rpm (4.8.0+) has problem objects, older have just strings. # Should probably move to using the new objects, when we can. For # now just be compatible. - results.append(to_str(prob)) + msg = to_str(prob) + + # RPM currently complains about self-conflicts on reinstalls, even + # though they are allowed otherwise, so just ignore them. + # Unfortunately, we have to parse the problem string in order to + # get the provide name (which should be the first token). + if prob.type == rpm.RPMPROB_CONFLICT: + tokens = msg.split() + pkgs = self.rpmdb.returnPackages(patterns=[prob.pkgNEVR]) + if tokens and pkgs: + name = tokens[0] + pkg = pkgs[0] + provs = self.rpmdb.getProvides(name).keys() + if len(provs) == 1 and provs[0] == pkg: + continue + + results.append(msg) return results
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