Your message dated Sun, 15 Feb 2015 11:48:27 +0000
with message-id <[email protected]>
and subject line Bug#778423: fixed in debbindiff 9
has caused the Debian Bug report #778423,
regarding support a plain text output mode
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 [email protected]
immediately.)
--
778423: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=778423
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: debbindiff
Version: 8
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: rebootstrap
A limitation of rebootstrap currently is that it can only output a build
log. Thus I embed the debbindiffs into the log. This is cumbersome to
read, since they are unrendered html. Having a plain text output mode
would make reading these logs way easier. Not as easy as the html
rendered presentation, but still more useful.
I therefore ask to add a plain text output mode.
Oh and here is a patch. :)
Helmut
diff -Nru debbindiff-8/debbindiff/presenters/text.py
debbindiff-8+nmu1/debbindiff/presenters/text.py
--- debbindiff-8/debbindiff/presenters/text.py 1970-01-01 00:00:00.000000000
+0000
+++ debbindiff-8+nmu1/debbindiff/presenters/text.py 2015-02-14
20:08:37.000000000 +0000
@@ -0,0 +1,17 @@
+import sys
+import difflib
+
+def output_text(differences):
+ for difference in differences:
+ print("difference between %s and %s" %
+ (difference.source1, difference.source2))
+ if difference.comment:
+ print("comment: %s" % difference.comment)
+ if difference.lines1 and difference.lines2:
+ for line in difflib.unified_diff(difference.lines1,
+ difference.lines2, difference.source1, difference.source2):
+ sys.stdout.write(line)
+ if difference.details:
+ print("descending into details")
+ output_text(difference.details)
+ print("returning from details")
diff -Nru debbindiff-8/debbindiff.py debbindiff-8+nmu1/debbindiff.py
--- debbindiff-8/debbindiff.py 2015-02-10 02:03:06.000000000 +0000
+++ debbindiff-8+nmu1/debbindiff.py 2015-02-14 20:03:12.000000000 +0000
@@ -26,6 +26,7 @@
from debbindiff import logger, VERSION
import debbindiff.comparators
from debbindiff.presenters.html import output_html
+from debbindiff.presenters.text import output_text
def create_parser():
@@ -38,6 +39,9 @@
default=False, help='display debug messages')
parser.add_argument('--html', metavar='output', dest='html_output',
help='write HTML report to given file')
+ parser.add_argument('--text', dest='text_output', default=False,
+ action='store_true',
+ help='write plain text output to stdout')
parser.add_argument('--max-report-size', metavar='BYTES',
dest='max_report_size', type=int,
help='maximum bytes written in report')
@@ -62,6 +66,8 @@
print(*args, **kwargs)
output_html(differences, css_url=parsed_args.css_url,
print_func=print_func,
max_page_size=parsed_args.max_report_size)
+ if len(differences) > 0 and parsed_args.text_output:
+ output_text(differences)
if len(differences) > 0:
sys.exit(1)
diff -Nru debbindiff-8/debian/changelog debbindiff-8+nmu1/debian/changelog
--- debbindiff-8/debian/changelog 2015-02-10 02:03:06.000000000 +0000
+++ debbindiff-8+nmu1/debian/changelog 2015-02-14 20:10:12.000000000 +0000
@@ -1,3 +1,10 @@
+debbindiff (8+nmu1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Add a text presentation based on unified diffs. (Closes: #-1)
+
+ -- Helmut Grohne <[email protected]> Sat, 14 Feb 2015 20:09:42 +0000
+
debbindiff (8) unstable; urgency=medium
[ Peter De Wachter ]
--- End Message ---
--- Begin Message ---
Source: debbindiff
Source-Version: 9
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 [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Jérémy Bobbio <[email protected]> (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 [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Sun, 15 Feb 2015 12:13:46 +0100
Source: debbindiff
Binary: debbindiff
Architecture: source all
Version: 9
Distribution: unstable
Urgency: medium
Maintainer: Reproducible builds folks
<[email protected]>
Changed-By: Jérémy Bobbio <[email protected]>
Description:
debbindiff - highlight differences between two builds of Debian packages
Closes: 774983 778423
Changes:
debbindiff (9) unstable; urgency=medium
.
[ Chris Lamb ]
* Add rpm-common to Build-Depends so that we can “import rpm" during build.
* Code improvements improvements.
.
[ Jérémy Bobbio ]
* Add plain text output for differences. Thanks Helmut Grohne for the
original patch. (Closes: #778423)
* Exit with 2 in case of errors. (Closes: #774983)
* Properly output diffs when one of the file is empty.
* Add support for comparing directories.
* Update debian/copyright.
Checksums-Sha1:
04a948838984f65a68a68c7ead7ad4efa04406f2 1760 debbindiff_9.dsc
2e3ac7c53cf584a50d5ca0495b191a74f8be68a0 31535 debbindiff_9.tar.gz
8025bc03085cce416a22536da2d7f9bfac0dff23 19682 debbindiff_9_all.deb
Checksums-Sha256:
e792dd7785c271ae15d0aa7d2347796aae8b96450068591b13806dd0816afd78 1760
debbindiff_9.dsc
a5779cb40e84199273f858257153e8a78cd55670ea76bf21053067bb87baedc4 31535
debbindiff_9.tar.gz
403827b98c20cbc89c698cbc8d5e992720a9aefd30c20f2cbf24e49b2854038a 19682
debbindiff_9_all.deb
Files:
f3734d88fde273a9c0c296977c8ebd5a 1760 devel optional debbindiff_9.dsc
0a2e35c7ec6781c5a01d742fafed6c64 31535 devel optional debbindiff_9.tar.gz
7ada19239102a3c225556ae672c2f720 19682 devel optional debbindiff_9_all.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iQIcBAEBCAAGBQJU4IJOAAoJEEAsIlA9Nuk2LfkP/jqAeFqf1mM2sY3kDcIE3TJ+
zftZw1jiNa7Rbeg9llpOP4VS4pFlJTDP2cguoiqPNVDJgR0600Ms8Rl1MF8lm0ge
kYz5Cr13sDyKojHc3Po+XhUdDqnZjNFo4ge2P52QGFKgNuwf4tstgC00KTl2kpGP
AIc9+SZOJ5YrTJicLk6K3yrtMIGrvHCnCwUS3ZvjSmjXLkaPnbG0UX3ChuK9g2ZL
Iqc4FeY4zTcjs817srzwaJrF1vlumSq+j1C3TXz2o8QJ+aysYGWBx9pmllnXZq88
7oFrqBaEIf0Dougt8L85qi32TPl4MeBXkNnimvp92unJtmO1n6SXsYEK9XOBEaSi
/0wl9vjw2ksEyFW/0eWfuhaxmGXHPMcZ539t/FuVFyMnmwVcO2Njd7qfGGp4D97L
gyU28jd+kNgHn9H570WRqEc9AQO+tnw2h75vXGayj0YyRnzeHHpqHugoaF6P0CJE
BwnrHjROOtXGaRyzh0sz5idMorOHyc9kf/rck7CO6nKMx6WtMU4pbAAchTicBoWx
iCBh+W9vDPsby2SQUiFyLgcCXs4sLMYf/iYHGK76zv+JS1j8Oxkk3Ok2B0AAfGQ9
VjgxSNuEQzUhb1oGPBSDa7Y4E+koD0oXTMJoD6xqAD7cNufsEpRm/8PDRtL/wj8z
P0Slsn+J8PID2utYrT1g
=WOnM
-----END PGP SIGNATURE-----
--- End Message ---