[yum-cvs] yum-utils/plugins/fedorakmod README, 1.3, 1.4 fedorakmod.py, 1.6, 1.7
Jack Neely
slack at linux.duke.edu
Wed Jan 24 19:16:59 UTC 2007
Update of /home/groups/yum/cvs/yum-utils/plugins/fedorakmod
In directory login1.linux.duke.edu:/tmp/cvs-serv2499/plugins/fedorakmod
Modified Files:
README fedorakmod.py
Log Message:
Clean up some comments and debug statements in fedorakmod.py. Also,
updated the TODO list in the README.
Index: README
===================================================================
RCS file: /home/groups/yum/cvs/yum-utils/plugins/fedorakmod/README,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- README 19 Sep 2006 15:13:34 -0000 1.3
+++ README 24 Jan 2007 19:16:57 -0000 1.4
@@ -5,11 +5,10 @@
To Do
=====
- *) Install kernel modules for all available kernels
*) Remove kernel modules if matching kernel is removed.
Folks, feel free to patch and add suggestions. It will only help FE kernel
module infrastructure develop faster.
-Jack Neely <jjneely at ncsu.edu> -- 07/05/2006
+Jack Neely <jjneely at ncsu.edu> -- 01/24/2007
Index: fedorakmod.py
===================================================================
RCS file: /home/groups/yum/cvs/yum-utils/plugins/fedorakmod/fedorakmod.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- fedorakmod.py 23 Jan 2007 23:17:14 -0000 1.6
+++ fedorakmod.py 24 Jan 2007 19:16:57 -0000 1.7
@@ -1,7 +1,7 @@
#!/usr/bin/python
# fedorakmod.py - Fedora Extras Yum Kernel Module Support
-# Copyright 2006 NC State University
+# Copyright 2006 - 2007 NC State University
# Written by Jack Neely <jjneely at ncsu.edu>
#
# SDG
@@ -68,22 +68,17 @@
return bag
-
def _getKernelDeps(po, match):
reqs = po.returnPrco(match)
return [ r for r in reqs if r[0] in kernelProvides ]
- #return filter(lambda r: r[0] in kernelProvides, reqs)
-
def getInstalledKernels(c):
return _whatProvides(c, kernelProvides)
-
def getInstalledModules(c):
return _whatProvides(c, ["kernel-modules"])
-
def getKernelProvides(po):
"""Pass in a package header. This function will return a list of
tuples (name, flags, ver) representing any kernel provides.
@@ -91,14 +86,12 @@
return _getKernelDeps(po, "provides")
-
def getKernelReqs(po):
"""Pass in a package header. This function will return a list of
tuples (name, flags, ver) representing any kernel requires."""
return _getKernelDeps(po, "requires")
-
def fakeName(po):
"""When Yum wont give us full PRCO information we yell
"Say my name, bitch!"
@@ -115,7 +108,6 @@
return ('-'.join(fields + ['kmod']), 'EQ',
(po.epoch, po.version, po.release))
-
def resolveVersions(packageList):
"""The packageDict is a dict of pkgtuple -> PO
We return a dict of kernel version -> list of kmod POs
@@ -162,7 +154,6 @@
return dict
-
def installKernelModules(c, newModules, installedModules):
"""Figure out what special magic needs to be done to install/upgrade
this kernel module. This doesn't actually initiate an install
@@ -191,7 +182,6 @@
(po, modpo))
break
-
def pinKernels(c, newKernels, modules):
"""If we are using kernel modules, do not upgrade/install a new
kernel until matching modules are available."""
@@ -218,10 +208,6 @@
# XXX: This wants a pkgtuple which will probably change RSN
c.getTsInfo().remove(kpo.pkgtup)
-
-# There is a Yum bug that prevents this from working propperly.
-# c.getRepos().getPackageSack().searchProvides("kernel-modules") does not
-# return packages with fully popluated Provides information
def installAllKmods(c, avaModules, modules, kernels):
list = []
names = []
@@ -250,7 +236,6 @@
return list
-
def tsCheck(te):
"Make sure this transaction element is sane."
@@ -258,11 +243,9 @@
te.ts_state = 'i'
te.output_state = TS_INSTALL
-
def init_hook(c):
c.info(3, "Loading Fedora Extras kernel module support.")
-
def postresolve_hook(c):
avaModules = c.getRepos().getPackageSack().searchProvides("kernel-modules")
@@ -285,7 +268,6 @@
# Install modules for all kernels
if c.confInt('main', 'installforallkernels', default=1) != 0:
- print "Running installAllKmods()"
moreModules = installAllKmods(c, avaModules,
newModules + installedModules,
newKernels + installedKernels)
@@ -293,7 +275,6 @@
# Pin kernels
if c.confInt('main', 'pinkernels', default=0) != 0:
- #print "Running pin kernels..."
pinKernels(c, newKernels, newModules + installedModules)
# Upgrade/Install kernel modules
More information about the Yum-cvs-commits
mailing list