[Pkg-dkms-maint] Bug#684326: DKMS: variable res should be unset just after calling get_module_verinfo()
Carlos Alberto Lopez Perez
clopez at igalia.com
Wed Aug 8 19:01:41 UTC 2012
Package: dkms
Version: 2.2.0.3-1
Severity: normal
Hello,
When building a DKMS module that don't supplies MODULE_VERSION strings
that tries to replace the in-kernel module that supplies this
MODULE_VERSION string DKMS fails to recognize that both modules are
different because it is not cleaning the variable res.
Just see this dirty test:
# Define get_module_verinfo (just c&p from /usr/bin/dmks)
$ get_module_verinfo(){
local vals=
while read -a vals; do
case ${vals[0]} in
version:) res[0]=${vals[1]}; res[2]=${vals[2]};;
srcversion:) res[1]=${vals[1]};;
esac
done < <(modinfo $1)
}
$ unset res
$ get_module_verinfo coretemp
$ echo $res
<- nothing, good since coretemp don't has MODULE_VERSION
get_module_verinfo e1000e
$ echo $res
1.5.1-k <- GOOD, this is the MODULE_VERSION of e1000e
$ get_module_verinfo coretemp
$ echo $res
1.5.1-k <- FAIL!!
This causes that DKMS don't installs the new module that is clearly
different than the in-kernel one (the first has no MODULE_VERSION and
the second one has)
The attached patch fixes this issue
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dkms.diff
Type: text/x-diff
Size: 299 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-dkms-maint/attachments/20120808/e72551e9/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 900 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-dkms-maint/attachments/20120808/e72551e9/attachment.pgp>
More information about the Pkg-dkms-maint
mailing list