[Yum-devel] kernel-module plugin - problems during install
Troy Dawson
dawson at fnal.gov
Tue Feb 28 15:14:42 UTC 2006
Hello,
I wanted to send in a patch, instead of just report a problem, but I've
gotten stuck.
Software:
yum-2.4.2
kernel-module plugin, latest from yum-utils
Scientific Linux 4.2
Problem:
When trying to install a program that requires a kernel-module, a kernel
module is selected, but it is not always for the correct kernel. It
then tries to install whichever kernel matches that kernel-module.
For upgrades, once the correct kernel-modules have been installed, work
great, just like it's supposed to.
Example:
# rpm -q kernel
kernel-2.6.9-22.0.2.EL.i686
# uname -r
2.6.9-22.0.2.EL
# yum install openafs openafs-client
Loading "kernel-module" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Excluding Packages from SL 4 base
Finished
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package openafs-client.i386 0:1.4.0-8.SL set to be updated
---> Package openafs.i386 0:1.4.0-8.SL set to be updated
--> Running transaction check
--> Processing Dependency: openafs-kernel for package: openafs-client
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package kernel-module-openafs-2.6.9-22.0.1.EL.i686 0:1.4.0-8.SL set
to be updated
--> Running transaction check
--> Processing Dependency: /boot/vmlinuz-2.6.9-22.0.1.EL for package:
kernel-module-openafs-2.6.9-22.0.1.EL
Importing Additional filelist information for dependency resolution
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package kernel.i686 0:2.6.9-22.0.1.EL set to be installed
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
openafs i386 1.4.0-8.SL sl-base
5.6 M
openafs-client i386 1.4.0-8.SL sl-base
444 k
Installing for dependencies:
kernel i686 2.6.9-22.0.1.EL sl-base
9.7 M
kernel-module-openafs-2.6.9-22.0.1.EL i686 1.4.0-8.SL
sl-base 238 k
Transaction Summary
=============================================================================
Install 4 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
As you can see, it's picking an older kernel-module, and then tries to
install the older kernel that goes with it.
DEBUGGING SO FAR:
Well, not all the debugging, just what I think is important, but there
might be something I missed.
# yum -d10 install openafs openafs-client
..snip...
Dep Number: 1/1
openafs-client requires: openafs-kernel
--> Processing Dependency: openafs-kernel for package: openafs-client
Requiring package is from transaction set
Resolving for requiring package: openafs-client-1.4.0-8.SL in state u
Resolving for requirement: openafs-kernel
Searching pkgSack for dep: openafs-kernel
Potential match for openafs-kernel from
kernel-module-openafs-2.6.9-22.0.1.ELsmp - 1.4.0-8.SL.i686
Matched kernel-module-openafs-2.6.9-22.0.1.ELsmp - 1.4.0-8.SL.i686 to
require for openafs-kernel
Potential match for openafs-kernel from
kernel-module-openafs-2.6.9-22.0.1.EL - 1.4.0-8.SL.i686
Matched kernel-module-openafs-2.6.9-22.0.1.EL - 1.4.0-8.SL.i686 to
require for openafs-kernel
Potential match for openafs-kernel from
kernel-module-openafs-2.6.9-22.0.2.ELsmp - 1.4.0-8.SL.i686
Matched kernel-module-openafs-2.6.9-22.0.2.ELsmp - 1.4.0-8.SL.i686 to
require for openafs-kernel
Potential match for openafs-kernel from
kernel-module-openafs-2.6.9-22.0.2.EL - 1.4.0-8.SL.i686
Matched kernel-module-openafs-2.6.9-22.0.2.EL - 1.4.0-8.SL.i686 to
require for openafs-kernel
TSINFO: Marking kernel-module-openafs-2.6.9-22.0.1.EL - 1.4.0-8.SL.i686
as install for openafs-client
miss = 0
conf = 0
CheckDeps = 1
--> Restarting Dependency Resolution with new changes.
...snip...
As I go through the code, I the problem is in the kernels that are
listed in the bit of code
kernels = []
for tsmem in ts.getMembers():
if tsmem.ts_state == 'u' and tsmem.name in knames:
kernels.append(tsmem.po)
This somehow isn't getting the right list of kernels needed so that when
we look for dependancies
def find_kmodules(availpkgs, provides, kernels):
matches = []
for pkg in availpkgs:
for kern in kernels:
for prov in provides:
if pkg.name == "%s-%s" % (prov, kunamer(kern)):
if pkg.arch == kern.arch:
matches.append(pkg)
return unique(matches)
Then it's only going through one kernel, which isn't even the right
kernel.
But ... I could be wrong, and even if I'm right, I haven't been able to
find out all the various states in tsmem.ts_state, which has made this
harder to test various things.
Any help would be appreciated.
Thanks
Troy Dawson
--
__________________________________________________
Troy Dawson dawson at fnal.gov (630)840-6468
Fermilab ComputingDivision/CSS CSI Group
__________________________________________________
More information about the Yum-devel
mailing list