Bug 429410

Summary: dkms weak modules support somewhat broken
Product: [Fedora] Fedora Reporter: Matt Domsch <matt_domsch>
Component: dkmsAssignee: Charles Rose <charles_rose>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: medium    
Version: rawhideCC: jcm, tcallawa, wwlinuxengineering
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-02-15 22:36:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 429426    

Description Matt Domsch 2008-01-19 14:21:30 UTC
Description of problem:
Anthony Chen from Teradata Corp. reports thusly:

   Recently, we have been testing LSI's linuxrdac package for SLES 10 SP1
   release. During the tests we found dkms didn't clean up the symbolic links
   in the /lib/modules/KERNE_VERSION/weak-updates directory and a "dkms
   remove" didn't clear dkms database properly. The LSI guys traced it down
   to a DKMS problem and here's the write-up:

   DKMS Problems:
   1) In the "do_uninstall()" function of dkms, they execute "weak-modules
   --remove-modules" before removing the original modules from the kernel.
   If you look in the weak-modules script for:
           elif [ -n "$remove_modules" ]; then
   A few lines down from that is the line:
           [ -e "$module" ] && continue
   What the above line checks for, if the module that we are trying to
   remove the "weak-links" for is still installed, it will not do anything.
   DKMS needs to issue the weak-modules command after the module has been
   uninstalled.

   2) dkms remove, the --all flag, and weak-modules.
   When we issue a "dkms remove" with the --all flag, dkms calls the  
   function "setup_kernels_arches()".  In here it will populate
   "kernelver_array[]" with each kernel listed when it does a "dkms status"
   on the passed in module (this includes weak-modules).  Then in the
   "remove_module()" function it will loop over the installed and
   weak-linked kernels.  Since there isn't an official entry in the DKMS
   tree for weak-modules, the user sees the error "Error! There is no
   instance of $module $module_version" and the dkms remove doesn't
   complete successfully.

Comment 1 Matt Domsch 2008-01-19 20:24:24 UTC
regarding point 1), this seems to be a fault of the weak-modules script.  I will
clone this bug and redirect to module-init-tools.  It should be perfectly
acceptable to remove the weak modules symlink w/o having first removed the
actual module.

Comment 2 Matt Domsch 2008-02-15 22:36:13 UTC
Fixed in v2.0.17.6.

Comment 3 Fedora Update System 2008-02-15 22:38:08 UTC
dkms-2.0.17.6-1.fc7 has been submitted as an update for Fedora 7

Comment 4 Fedora Update System 2008-02-15 22:39:09 UTC
dkms-2.0.17.6-1.fc8 has been submitted as an update for Fedora 8