[Pkg-dkms-commits] [dkms] 05/07: Port apport hook to python3 and add python3-apport to Suggests (Closes: #707008)

Aron Xu aron at debian.org
Tue Jul 5 22:00:56 UTC 2016


This is an automated email from the git hooks/post-receive script.

aron pushed a commit to branch master
in repository dkms.

commit 18df94d39cf247a5bc13650617b61aba57c00521
Author: Dirk Griesbach <spamthis at freenet.de>
Date:   Wed Jul 6 05:27:52 2016 +0800

    Port apport hook to python3 and add python3-apport to Suggests (Closes: #707008)
---
 debian/control                                     |  1 +
 .../patches/0013-Port-apport-hook-to-python3.patch | 57 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 59 insertions(+)

diff --git a/debian/control b/debian/control
index 086a315..8c26c29 100644
--- a/debian/control
+++ b/debian/control
@@ -25,6 +25,7 @@ Depends: ${misc:Depends},
 Recommends: fakeroot,
  menu | sudo,
  linux-headers-686-pae | linux-headers-amd64 | linux-headers-generic | linux-headers
+Suggests: python3-apport
 Description: Dynamic Kernel Module Support Framework
  DKMS is a framework designed to allow individual kernel modules to be upgraded
  without changing the whole kernel. It is also very easy to rebuild modules as
diff --git a/debian/patches/0013-Port-apport-hook-to-python3.patch b/debian/patches/0013-Port-apport-hook-to-python3.patch
new file mode 100644
index 0000000..62def20
--- /dev/null
+++ b/debian/patches/0013-Port-apport-hook-to-python3.patch
@@ -0,0 +1,57 @@
+From: Dirk Griesbach <spamthis at freenet.de>
+Date: Wed, 6 Jul 2016 05:27:08 +0800
+Subject: Port apport hook to python3
+
+---
+ dkms_apport.py | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/dkms_apport.py b/dkms_apport.py
+index c359486..08581c5 100755
+--- a/dkms_apport.py
++++ b/dkms_apport.py
+@@ -36,12 +36,12 @@ optparser.add_option('-k', help="Specify the kernel version",
+ options=optparser.parse_args()[0]
+ 
+ if not options.module or not options.version:
+-    print >> sys.stderr, 'ERROR (dkms apport): both -m and -v are required'
++    print('ERROR (dkms apport): both -m and -v are required', file=sys.stderr)
+     sys.exit(2)
+ 
+ package=packaging.get_file_package('/usr/src/' + options.module + '-' + options.version)
+ if package is None:
+-    print >> sys.stderr, 'ERROR (dkms apport): binary package for %s: %s not found' % (options.module,options.version)
++    print('ERROR (dkms apport): binary package for %s: %s not found' % (options.module,options.version), file=sys.stderr)
+     sys.exit(1)
+ 
+ if options.kernel:
+@@ -50,9 +50,9 @@ if options.kernel:
+ 
+     try:
+         apport.packaging.is_distro_package(kernel_package)
+-    except ValueError, e:
++    except ValueError as e:
+         if e == 'package does not exist':
+-            print >> sys.stderr, 'ERROR (dkms apport): kernel package %s is not supported' % (kernel_package)
++            print('ERROR (dkms apport): kernel package %s is not supported' % (kernel_package), file=sys.stderr)
+             sys.exit(1)
+ 
+ make_log=os.path.join('/var','lib','dkms',options.module,options.version,'build','make.log')
+@@ -62,7 +62,7 @@ report['Package'] = package
+ try:
+     report['SourcePackage'] = apport.packaging.get_source(package)
+ except ValueError:
+-    print >> sys.stderr, 'ERROR (dkms apport): unable to determine source package for %s' % package
++    print('ERROR (dkms apport): unable to determine source package for %s' % package, file=sys.stderr)
+     sys.exit(3)
+ try:
+     version = packaging.get_version(package)
+@@ -81,7 +81,7 @@ attach_file_if_exists(report, make_log, 'DKMSBuildLog')
+ if 'DKMSBuildLog' in report:
+     this_year = str(datetime.today().year)
+     if 'Segmentation fault' in report['DKMSBuildLog']:
+-        print >> sys.stderr, 'ERROR (dkms apport): There was a segmentation fault when trying to build the module'
++        print('ERROR (dkms apport): There was a segmentation fault when trying to build the module', file=sys.stderr)
+         sys.exit(1)
+     dupe_sig = ''
+     for line in report['DKMSBuildLog'].split('\n'):
diff --git a/debian/patches/series b/debian/patches/series
index 97bd7b7..d26ae3e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -10,3 +10,4 @@
 0010-parallell-build.patch
 0011-690866-helpmsg.patch
 0012-Do-not-ignore-kernelsourcedir.patch
+0013-Port-apport-hook-to-python3.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-dkms/dkms.git



More information about the Pkg-dkms-commits mailing list