Package: dh-python
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu kinetic ubuntu-patch

Dear Maintainer,

In verbose mode, if files differ in share_files(), dhpython will try to
show a diff of the files. When these files are static libraries, this
raises a UnicodeDecodeError. For example, from a recent numpy build on
Ubuntu kinetic[1].

In Ubuntu, the attached patch was applied to avoid diffing .a files,
just as is currently done for .so files:

  * dhpython/fs.py: do not try to diff static libraries in verbose mode (LP: 
#1990562)

Thanks,
Nick

[1] 
https://launchpadlibrarian.net/624822201/buildlog_ubuntu-kinetic-arm64.numpy_1%3A1.21.5-1build2_BUILDING.txt.gz
diff -Nru dh-python-5.20220819/dhpython/fs.py 
dh-python-5.20220819ubuntu1/dhpython/fs.py
--- dh-python-5.20220819/dhpython/fs.py 2022-08-19 16:34:55.000000000 -0400
+++ dh-python-5.20220819ubuntu1/dhpython/fs.py  2022-09-22 10:38:23.000000000 
-0400
@@ -144,7 +144,7 @@
         else:
             # The files differed so we cannot collapse them.
             log.warn('Paths differ: %s and %s', fpath1, fpath2)
-            if options.verbose and not i.endswith('.so'):
+            if options.verbose and not i.endswith(('.so','.a')):
                 with open(fpath1) as fp1:
                     fromlines = fp1.readlines()
                 with open(fpath2) as fp2:

Reply via email to