---
 docs/yum.conf.5 |    7 +++++++
 yum/config.py   |    3 +++
 yum/depsolve.py |    7 +++++--
 3 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/docs/yum.conf.5 b/docs/yum.conf.5
index e766cb0..59bd779 100644
--- a/docs/yum.conf.5
+++ b/docs/yum.conf.5
@@ -647,6 +647,13 @@ installed dependencies and check for an update.
 Boolean (1, 0, True, False, yes,no) Defaults to False
 
 .IP
+\fBrecheck_installed_requires \fR
+When upgrading a package do we recheck any requirements that existed in the old
+package. Turning this on shouldn't do anything but slow yum depsolving down,
+however using rpm --nodeps etc. can break the rpmdb and then this will help.
+Boolean (1, 0, True, False, yes,no) Defaults to False
+
+.IP
 \fBreset_nice \fR
 If set to true then yum will try to reset the nice value to zero, before
 running an rpm transaction. Defaults to False.
diff --git a/yum/config.py b/yum/config.py
index 982c0c5..cdb0c2b 100644
--- a/yum/config.py
+++ b/yum/config.py
@@ -856,6 +856,9 @@ class YumConf(StartupConf):
                                          'commands'),
                                      mapper={'cmds'          : 'commands',
                                              'default' 
:'single-user-commands'})
+
+    recheck_installed_requires = BoolOption(False)
+
     _reposlist = []
 
     def dump(self):
diff --git a/yum/depsolve.py b/yum/depsolve.py
index de01582..6b386c2 100644
--- a/yum/depsolve.py
+++ b/yum/depsolve.py
@@ -998,9 +998,12 @@ class Depsolve(object):
 
         # if this is an update, we should check what the old
         # requires were to make things faster
+        #  Note that if the rpmdb is broken, this gets annoying. So we provide
+        # a way to turn it off.
         oldreqs = []
-        for oldpo in txmbr.updates:
-            oldreqs.extend(oldpo.returnPrco('requires'))
+        if not self.conf.recheck_installed_requires:
+            for oldpo in txmbr.updates:
+                oldreqs.extend(oldpo.returnPrco('requires'))
         oldreqs = set(oldreqs)
 
         ret = []
-- 
1.7.6.4

_______________________________________________
Yum-devel mailing list
Yum-devel@lists.baseurl.org
http://lists.baseurl.org/mailman/listinfo/yum-devel

Reply via email to