[Yum-devel] [PATCH 2/2] add 'if self.conf.obsoletes' to the installed-pkg obsoletes check for localinstall
Seth Vidal
skvidal at fedoraproject.org
Tue Jun 15 17:48:25 UTC 2010
---
yum/__init__.py | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/yum/__init__.py b/yum/__init__.py
index 2db03ae..5bc97be 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -3698,10 +3698,11 @@ class YumBase(depsolve.Depsolve):
self.logger.critical(_('Cannot add package %s to transaction. Not a compatible architecture: %s'), pkg, po.arch)
return tx_return
- obsoleters = po.obsoletedBy(self.rpmdb.searchObsoletes(po.name))
- if obsoleters:
- self.logger.critical(_('Cannot install package %s. It is obsoleted by installed package %s'), po, obsoleters[0])
- return tx_return
+ if self.conf.obsoletes:
+ obsoleters = po.obsoletedBy(self.rpmdb.searchObsoletes(po.name))
+ if obsoleters:
+ self.logger.critical(_('Cannot install package %s. It is obsoleted by installed package %s'), po, obsoleters[0])
+ return tx_return
# everything installed that matches the name
installedByKey = self.rpmdb.searchNevra(name=po.name)
--
1.7.0.1
More information about the Yum-devel
mailing list