← Back to team overview

kernel-packages team mailing list archive

[Bug 151664] Re: DKMS 2.0.17.4 uninstalls wrong file

 

The bug task for the somerville project has been removed by an automated
script.  This bug has been cloned on that project and is available here:
https://bugs.launchpad.net/bugs/1305815

** No longer affects: somerville

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to dkms in Ubuntu.
https://bugs.launchpad.net/bugs/151664

Title:
  DKMS 2.0.17.4 uninstalls wrong file

Status in “dkms” package in Ubuntu:
  Fix Released

Bug description:
  DKMS 2.0.17.4 and earlier has a bug whereby when running 'dkms
  uninstall', it will not delete the module previously installed into
  /lib/modules/$kernelver/updates/dkms/  but will instead delete the
  module at /lib/modules/$kernelver/kernel/drivers/... which is
  incorrect.  DKMS 2.0.17.5 corrects this.

  In addition, DKMS 2.0.17.5 invokes depmod after uninstalling a module
  so stale data is not retained, and invokes udevtrigger after
  installing a module for the currently-running kernel in case that
  module now enables a new device which udev should be aware of.

  DKMS 2.0.17.5 is available in REVU at
  http://revu.tauware.de/details.py?upid=376

  $ diffstat /tmp/dkms.patch
   Makefile             |    4 ++--
   dkms                 |   14 +++++++++++---
   dkms_autoinstaller   |    2 ++
   pkg/debian/changelog |    8 ++++++++
   4 files changed, 23 insertions, 5 deletions

  Package builds, installs, upgrades correctly.  Affected code paths
  tested.  Does not break other packages (none presently in Universe
  depend on it).

  debdiff:
  File lists identical (after any substitutions)

  Control files: lines which differ (wdiff format)
  ------------------------------------------------
  Version: [-2.0.17.4-0ubuntu1-] {+2.0.17.5-0ubuntu1+}


  The relevant changes are:
  diff --git a/dkms b/dkms
  index 13dbc54..c9b07c7 100755
  --- a/dkms
  +++ b/dkms
  @@ -1247,6 +1247,11 @@ function install_module()
          fi
       fi

  +    # Notify udev if we installed something for the currently running kernel
  +    if [ -x /sbin/udevtrigger -a "${kernelver_array[0]}" == "$(uname -r)" -a "${arch_array[0]}" == "$(uname -m)" ]; then
  +       /sbin/udevtrigger
  +    fi
  +
       echo $""
       echo $"DKMS: install Completed."
   }
  @@ -1451,9 +1456,9 @@ function possible_dest_module_locations()
       # override_dest_module_location() is what controls whether or not they're the same.

       local location
  -    location[0]="${DEST_MODULE_LOCATION[$count]}"
  -    [ "${location[0]}" != "${dest_module_location[$count]}" ] && \
  -       location[1]="${dest_module_location[$count]}"
  +    location[0]="${dest_module_location[$count]}"
  +    [ "${DEST_MODULE_LOCATION[$count]}" != "${dest_module_location[$count]}" ] && \
  +       location[1]="${DEST_MODULE_LOCATION[$count]}"

       echo "${location[0]} ${location[1]}"
   }
  @@ -1581,6 +1586,9 @@ function do_uninstall()
       # But only do this if it was just ACTIVE on the kernel we just uninstalled from
       [ -n "$was_active" ] && [ -n "$remake_initrd" ] && $0 status -m $module -v $module_version | grep -q "installed" && modu
  leconfig_add "$1"

  +    # Run depmod because we changed /lib/modules
  +    invoke_command "depmod -a ${kernelver_array[0]}" "depmod" background
  +
       echo $""
       echo $"DKMS: uninstall Completed."
   }

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dkms/+bug/151664/+subscriptions