Your message dated Fri, 27 Mar 2015 18:03:39 +0000
with message-id <e1ybybb-0001wu...@franck.debian.org>
and subject line Bug#781280: fixed in debbindiff 12
has caused the Debian Bug report #781280,
regarding --text crashes when encountering empty files
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
781280: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=781280
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: debbindiff
Version: 11
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

debbindiff --text crashes when it encounters an empty file.

Example input package triggering the error: libreadline6

Example traceback being fixed:

Traceback (most recent call last):
  File "/usr/bin/debbindiff", line 120, in <module>
    sys.exit(main())
  File "/usr/bin/debbindiff", line 114, in main
    output_text(differences, print_func=print_func)
  File "/usr/lib/python2.7/dist-packages/debbindiff/presenters/text.py", line 
71, in output_text
    print_details(difference, print_func)
  File "/usr/lib/python2.7/dist-packages/debbindiff/presenters/text.py", line 
62, in print_details
    print_details(detail, new_print_func)
  File "/usr/lib/python2.7/dist-packages/debbindiff/presenters/text.py", line 
62, in print_details
    print_details(detail, new_print_func)
  File "/usr/lib/python2.7/dist-packages/debbindiff/presenters/text.py", line 
62, in print_details
    print_details(detail, new_print_func)
  File "/usr/lib/python2.7/dist-packages/debbindiff/presenters/text.py", line 
59, in print_details
    print_difference(detail, print_func)
  File "/usr/lib/python2.7/dist-packages/debbindiff/presenters/text.py", line 
36, in print_difference
    if not difference.lines2[-1].endswith('\n'):
IndexError: list index out of range

I think the fix is pretty straight forward.

Helmut
>From 8697e25016f0cd2786563cc5c5aa440fa99ef62d Mon Sep 17 00:00:00 2001
From: Helmut Grohne <hel...@subdivi.de>
Date: Thu, 26 Mar 2015 06:58:20 +0100
Subject: [PATCH] fix IndexError from --text with empty files

Example input package triggering the error: libreadline6

Example traceback being fixed:

Traceback (most recent call last):
  File "/usr/bin/debbindiff", line 120, in <module>
    sys.exit(main())
  File "/usr/bin/debbindiff", line 114, in main
    output_text(differences, print_func=print_func)
  File "/usr/lib/python2.7/dist-packages/debbindiff/presenters/text.py", line 71, in output_text
    print_details(difference, print_func)
  File "/usr/lib/python2.7/dist-packages/debbindiff/presenters/text.py", line 62, in print_details
    print_details(detail, new_print_func)
  File "/usr/lib/python2.7/dist-packages/debbindiff/presenters/text.py", line 62, in print_details
    print_details(detail, new_print_func)
  File "/usr/lib/python2.7/dist-packages/debbindiff/presenters/text.py", line 62, in print_details
    print_details(detail, new_print_func)
  File "/usr/lib/python2.7/dist-packages/debbindiff/presenters/text.py", line 59, in print_details
    print_difference(detail, print_func)
  File "/usr/lib/python2.7/dist-packages/debbindiff/presenters/text.py", line 36, in print_difference
    if not difference.lines2[-1].endswith('\n'):
IndexError: list index out of range
---
 debbindiff/presenters/text.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/debbindiff/presenters/text.py b/debbindiff/presenters/text.py
index 5cda5ce..ca60af8 100644
--- a/debbindiff/presenters/text.py
+++ b/debbindiff/presenters/text.py
@@ -30,10 +30,10 @@ def print_difference(difference, print_func):
         for line in difference.comment.split('\n'):
             print_func(u"│┄ %s" % line)
     if difference.lines1 or difference.lines2:
-        if not difference.lines1[-1].endswith('\n'):
+        if difference.lines1 and not difference.lines1[-1].endswith('\n'):
             difference.lines1[-1] = difference.lines1[-1] + '\n'
             difference.lines1.append('<No newline at the end>\n')
-        if not difference.lines2[-1].endswith('\n'):
+        if difference.lines2 and nand ot difference.lines2[-1].endswith('\n'):
             difference.lines2[-1] = difference.lines2[-1] + '\n'
             difference.lines2.append('<No newline at the end>\n')
         g = difflib.unified_diff(difference.lines1, difference.lines2)
-- 
2.1.4


--- End Message ---
--- Begin Message ---
Source: debbindiff
Source-Version: 12

We believe that the bug you reported is fixed in the latest version of
debbindiff, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 781...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Jérémy Bobbio <lu...@debian.org> (supplier of updated debbindiff package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Fri, 27 Mar 2015 18:42:26 +0100
Source: debbindiff
Binary: debbindiff
Architecture: source all
Version: 12
Distribution: unstable
Urgency: low
Maintainer: Reproducible builds folks 
<reproducible-builds@lists.alioth.debian.org>
Changed-By: Jérémy Bobbio <lu...@debian.org>
Description:
 debbindiff - highlight differences between two builds of Debian packages
Closes: 772029 778641 779476 781280
Changes:
 debbindiff (12) unstable; urgency=low
 .
   [ Helmut Grohne ]
   * Attempt at fixing unicode issues with --text. (Closes: #778641)
 .
   [ Jérémy Bobbio ]
   * Try with utf-8 encoding when comparing text files and no common
     encoding has been detected.
   * Perform content comparison when finding differences instead of
     waiting for the presentation phases. (Closes: #781280)
   * Instead of using vim, the HTML view is created from diff output.
     (Closes: #772029, #779476)
Checksums-Sha1:
 79cf576bee89c3551a0b4ccfdd736e21fb70912c 1764 debbindiff_12.dsc
 71e0e7b53b95f22f9568e6ed6e95e530aeaef264 37255 debbindiff_12.tar.gz
 484a65e84acb1a9d7057065f662acf8377fa7dbb 24768 debbindiff_12_all.deb
Checksums-Sha256:
 f6ddc03c1036de358fcc9c9ffda9d1418e755c8dd0878c5304773ebedc9da847 1764 
debbindiff_12.dsc
 290c7f80766279bbe441676c102ec2825ae5006301eb5589ebf077aa9deca3d9 37255 
debbindiff_12.tar.gz
 c6ee362476b33a1421f5473789083925461690833f4eee11a58ebee39c3d884e 24768 
debbindiff_12_all.deb
Files:
 2c779e0bb793148da1347f8aa6fd4024 1764 devel optional debbindiff_12.dsc
 c1f5d0c21b317a40604cbef65dd55fd3 37255 devel optional debbindiff_12.tar.gz
 497e4d23519d39b0a3b7e5f61cea92b1 24768 devel optional debbindiff_12_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBCAAGBQJVFZgFAAoJEEAsIlA9Nuk2TGgQAI8DvctQu44BAmkMqJ12K9lC
pD+vocNWCeFdzP2lo7HE9iME79K2r+Lv3YnLMNksMPdQ1Q3YPt+1RiD08bW2gxeP
a7pcImJOIzfB66EtLns9pUoWOSAdUKHeXtLbUfHFGhmqPilRwYFGMuJOVkpK17wn
lqsQbD3VJLJ4vCfe9Up5LsoCElA+9NBFvKrwG4nLzY2ojYKj5tbsZfcz+KX/pFnF
XUWZkYCAmhGf1Qcf9b6zRh5D21X0ClmAq05jk1dYoH+72MhH1qbrg6xTCy5GC6lS
T6DiZ5zI4FF64F0fQ0g0JJhgC/j3JrikpFQCzgEkcvfreZtYcwozcU/8eXs+M336
zSONqaO+3JKS3q/Nosy4DjWBbjK/uZ4vYNCh9XNOMeYaKFOf2XMZF8BCf7fuuN6k
D79XrbijUSj2Vi9O7kTv7+JecHI0mwbIICfsYO8cnz3W7dGcPv8bmwn2MfZFfnpx
o7iyKZubTojYyiMr8jM8rruZ0hzoadPnINWnDuEDbkb6iCs42AebmmP3IxVFQf6H
qQb3z2e7u7eKywhPQZJS7Tm2D+tAtFaXlFx+3LB67haha9YTXkKE3s5pJE6Ow1j1
MLyBSj7xFx9Dl+JubYqRFr9VM1uOmcyp8foYzjQMGJWuR+3qz1IRnKWBtbzoW/Kl
oZ7Miz84IxOU93gYL4E8
=HUpP
-----END PGP SIGNATURE-----

--- End Message ---
_______________________________________________
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Reply via email to