Ubuntu

Merge lp:~vanvugt/ubuntu/oneiric/bcmwl/fix-776439 into lp:ubuntu/natty/bcmwl

Proposed by Daniel van Vugt on 2011-06-02
Status: Merged
Merge reported by: Kees Cook
Merged at revision: not available
Proposed branch: lp:~vanvugt/ubuntu/oneiric/bcmwl/fix-776439
Merge into: lp:ubuntu/natty/bcmwl
Diff against target: 16 lines (+4/-2) 1 file modified
To merge this branch: bzr merge lp:~vanvugt/ubuntu/oneiric/bcmwl/fix-776439
Reviewer Review Type Date Requested Status
Luke Yelavich Approve on 2011-06-03
Ubuntu branches 2011-06-02 Pending
Review via email: mp+63192@code.launchpad.net

Commit Message

Failing to remove a DKMS module that does not exist is not an error (LP: #776439)

Description of the Change

The prerm script for bcmwl-kernel-source was often failing to remove a DKMS module that did not exist. Failing to remove something that does not exist should not mean the overall remove operation should fail.

This patch ensures that if the DKMS module does not exist, then prerm doesn't fail trying to remove it (LP: #776439)

It is true that the root cause of this bug is failure to install the DKMS module in the first place. However that failure would always be visible as a failure during installation, and should be treated as a separate bug/s.

To post a comment you must log in.
Luke Yelavich (themuso) wrote :

Thanks for your work. Both this fix and the fix for bug 776165 are worthy of a stable update for natty. I have prepared the necessary paperwork for this update and will be uploading both fixes shortly.

Thanks again.

review: Approve

Preview Diff

1=== modified file 'debian/bcmwl-kernel-source.prerm'
2--- debian/bcmwl-kernel-source.prerm 2010-11-25 15:06:14 +0000
3+++ debian/bcmwl-kernel-source.prerm 2011-06-02 05:25:52 +0000
4@@ -10,8 +10,10 @@
5 CVERSION=`dpkg-query -W -f='${Version}' bcmwl-kernel-source | awk -F "-" '{print $1}' | cut -d\: -f2`
6 case "$1" in
7 remove|upgrade)
8- echo "Removing all DKMS Modules"
9- dkms remove -m bcmwl -v $CVERSION --all > /dev/null
10+ count=`dkms status -m bcmwl -v $CVERSION | wc -l`
11+ echo "Removing all DKMS Modules ($count)"
12+ [ $count -le 0 ] && true ||
13+ dkms remove -m bcmwl -v $CVERSION --all > /dev/null
14 echo "Done."
15 ;;
16 esac

Subscribers

People subscribed via source and target branches