[Pkg-dkms-maint] Bug#707008: dkms: should depend on python-apport

Dirk Griesbach spamthis at freenet.de
Thu Jul 31 08:35:24 UTC 2014

Package: dkms
Followup-For: Bug #707008
Tags: patch

Am Mo, 06. Mai 2013 um 22:03:53 +0200 schrieb Matthias Liertzer:
> while updating the system to the newest version of linux-headers in unstable
> (linux-headers-3.8-1-amd64), dkms failed to run the package hooks for dkms. The
> script in /usr/share/apport/package-hooks/dkms_packages.py failed because it
> imports the python module apport, which is, however, not installed on the
> machine. Installing python-apport and applying the following patch

I don't think it is wise to depend on a package which only exists in
experimental. Besides this, there is no need for dkms to depend on
python-apport as it only executes the package hook if apport is
installed. As apport pulls in the apport python module, everything
should be working as expected: Without installing apport everything is
working and people using apport should cope with the experimental nature
of… um… experimental. :)

However, /usr/sbin/dkms calls the hook if a build problem occurs (and
apport is installed) by executing it with python, which by default is a
symlink to python2. But apport pulls in the apport module for Python3.
And here we go. dkms will fail if it calls its apport-hook as Python2
doesn't know about Python3 modules.

There are several options:
 * Use the attached patches to fix dkms to call python3 explicitly and
   port the hook to Python3 (thanks to 2to3). The latter maybe need a
   bit more grooming as I didn't test it.
 * apport could at least suggest or recommend python-apport
 * Let dkms only suggest python-apport. This should be OK as suggestions
   won't be installed by default. So nobody is forced to install
   a) software from experimental or 
   b) apport, even if it wouldn't be experimental.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dkms_python3_apport.py
Type: text/x-python
Size: 604 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-dkms-maint/attachments/20140731/4e4ee688/attachment.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dkms_packages_hook_2to3.patch
Type: text/x-diff
Size: 2200 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-dkms-maint/attachments/20140731/4e4ee688/attachment.patch>

More information about the Pkg-dkms-maint mailing list