Philipp Kaluza <pk+d...@yomu.de> writes:

> since DKMS has been announced as the new blessed way to build
> out-of-tree modules, I thought I'd give it a spin.  However, when the
> appropriate linux-headers are not installed, installing
> openafs-modules-dkms fails pretty ungracefully:

> | Setting up openafs-modules-dkms (1.4.11+dfsg-4) ...
> | 
> | Creating symlink /var/lib/dkms/openafs/1.4.11/source ->
> |                  /usr/src/openafs-1.4.11
> | 
> | DKMS: add Completed.
> | 
> | Error! Your kernel source for kernel 2.6.30-2-686 cannot be found at
> | /lib/modules/2.6.30-2-686/build or /lib/modules/2.6.30-2-686/source.
> | You can use the --kernelsourcedir option to tell DKMS where it's located.

> So far so good, it tells me roughly what it's missing.

Yeah, unfortunately there's no good way to express the correct dependency.

> But after installing linux-headers-2.6.30-2-686, i see this:

> | Setting up openafs-modules-dkms (1.4.11+dfsg-4) ...
> | 
> | Error! DKMS tree already contains: openafs-1.4.11
> | You cannot add the same module/version combo more than once.
> | dpkg: error processing openafs-modules-dkms (--configure):
> |  subprocess installed post-installation script returned error exit status 3

> I think this should fall back more gracefully - possibly by removing the
> module from DKMS' list if the automatic build fails.

Or removing it before adding it again when it's reconfigured.

> Looking over /etc/dkms/template-dkms-mkdeb/debian, it seems the "new
> style" source package template outsources all this to a central
> /usr/lib/dkms/common.postinst file (installed by dkms, ofcourse) - which
> would handle the problem gracefully.

I'm going to hold off on using this for right now since I want to be sure
that the package will work with older versions of dkms, but I'll probably
do that down the road.  In the meantime, I read over the code prior to
that central file and double-checked what I was doing against it, and it
looks like it just removes the module if it was already added.  Code to
do that will be in the next version.

Thank you for the report!

-- 
Russ Allbery (r...@debian.org)               <http://www.eyrie.org/~eagle/>



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to