Package: fglrx-modules-dkms Version: 1:9-11-1 Severity: normal Tags: patch --- Please enter the report below this line. ---
When the dkms module is already added (e.g. when reconfiguring the package, because the first configure failed), the postinst fails because dkms complains about the module being already present. The attached patch adds a check to only add the module once. --- System information. --- Architecture: amd64 Kernel: Linux 2.6.32-rc8 Debian Release: squeeze/sid 500 unstable ftp.de.debian.org 500 karmic ppa.launchpad.net 101 experimental ftp.de.debian.org --- Package information. --- Depends (Version) | Installed ======================-+-=========== dkms | 2.1.0.1-2 Package's Recommends field is empty. Suggests (Version) | Installed ===========================-+-=========== fglrx-driver | 1:9-11-1
--- fglrx-modules-dkms.postinst.old 2009-11-18 10:39:45.000000000 +0100 +++ fglrx-modules-dkms.postinst 2009-11-20 22:06:58.000000000 +0100 @@ -7,7 +7,11 @@ version=`dpkg-query -W -f='${Version}' "$package" \ |rev|cut -d- -f2-|rev|cut -d':' -f2|tr -d "\n"` -dkms add -m fglrx -v "$version" +isadded=`dkms status -m fglrx -v "$version"` + +if [ "${isadded}x" = "x" ] ; then + dkms add -m fglrx -v "$version" +fi if [ "$1" = 'configure' ] ; then dkms build -m fglrx -v "$version"