[yum-cvs] plugins/fedorakmod
Jack Neely
slack at linux.duke.edu
Wed Sep 19 17:03:15 UTC 2007
plugins/fedorakmod/fedorakmod.py | 10 ++++++++++
1 file changed, 10 insertions(+)
New commits:
commit 071737fbad4a8ffe36f044f5b3ad8f7e93cb296b
Author: Jack Neely <jjneely at ncsu.edu>
Date: Wed Sep 19 11:15:59 2007 -0400
We need to catch when we install a kmod with a lower VR than a kmod of
the same name that is already installed. RPM doesn't like this so
we need to toss in an extra flag or the transaction wont proccede.
diff --git a/plugins/fedorakmod/fedorakmod.py b/plugins/fedorakmod/fedorakmod.py
index 8d295a2..b5a3867 100644
--- a/plugins/fedorakmod/fedorakmod.py
+++ b/plugins/fedorakmod/fedorakmod.py
@@ -26,6 +26,7 @@ from sets import Set
from yum import packages
from yum.constants import TS_INSTALL
from yum.plugins import TYPE_CORE, PluginYumExit
+from rpm import RPMPROB_FILTER_OLDPACKAGE
requires_api_version = '2.4'
plugin_type = (TYPE_CORE,)
@@ -225,6 +226,15 @@ def installAllKmods(c, avaModules, modules, kernels):
if po.kmodName in names:
interesting.append(po)
+ # If We have stuff in the interesting list its most likely a kmod for
+ # an older kernel and therefore will have a VR < a VR of a kmod that
+ # may already be installed. RPM doesn't like installing packages
+ # older than what's already installed. Tell it to shutup.
+ # XXX: If we thought hard enough we could do this more exactly.
+ if len(interesting) > 0:
+ tsInfo = c.getTsInfo()
+ tsInfo.probFilterFlags.append(RPMPROB_FILTER_OLDPACKAGE)
+
table = resolveVersions(interesting + modules)
for kernel in [ getKernelProvides(k)[0] for k in kernels ]:
More information about the Yum-cvs-commits
mailing list