[firmware-nonfree] 02/03: debian/bin/gencontrol.py: Copy copyright files as binary, not default-encoded text

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Thu Jun 15 02:36:52 UTC 2017


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

benh pushed a commit to branch jessie-backports
in repository firmware-nonfree.

commit 1c32c91c97b761f02866d426b7e5b66da621d9be
Author: Ben Hutchings <ben at decadent.org.uk>
Date:   Thu Jun 15 03:25:17 2017 +0100

    debian/bin/gencontrol.py: Copy copyright files as binary, not default-encoded text
    
    Python 3.4 in jessie has a default text encoding of ASCII and blows up
    when trying to copy UTF-8 files this way.  Since we just copy these
    files verbatim, use binary mode rather than bothering with text codecs.
---
 debian/bin/gencontrol.py | 4 ++--
 debian/changelog         | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/debian/bin/gencontrol.py b/debian/bin/gencontrol.py
index 491bbe3..992de6a 100755
--- a/debian/bin/gencontrol.py
+++ b/debian/bin/gencontrol.py
@@ -200,8 +200,8 @@ class GenControl(debian_linux.gencontrol.Gencontrol):
         package_dir = "debian/config/%s" % package
 
         if os.path.exists('%s/copyright' % package_dir):
-            f = open('%s/copyright' % package_dir)
-            open("debian/firmware-%s.copyright" % package, 'w').write(f.read())
+            f = open('%s/copyright' % package_dir, 'rb')
+            open("debian/firmware-%s.copyright" % package, 'wb').write(f.read())
         else:
             vars['license'] = codecs.open("%s/LICENSE" % package_dir, 'r', 'utf-8').read()
             codecs.open("debian/firmware-%s.copyright" % package, 'w', 'utf-8').write(self.substitute(copyright, vars))
diff --git a/debian/changelog b/debian/changelog
index 72f08a8..4359bfd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ firmware-nonfree (20161130-3~bpo8+1) UNRELEASED; urgency=medium
 
   * Rebuild for jessie-backports:
     - Use linux-support 4.9.0-0.bpo.3
+    - debian/bin/gencontrol.py: Copy copyright files as binary, not default-
+      encoded text
 
  -- Ben Hutchings <ben at decadent.org.uk>  Thu, 15 Jun 2017 03:14:10 +0100
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/firmware-nonfree.git



More information about the Kernel-svn-changes mailing list