Bug#638864: dpatch-edit-patch fails if there is binary data in the patch

August 22nd, 2011 - 11:10 am ET by Ben Brown | Report spam
Package: dpatch
Version: 2.0.31
Severity: normal


dpatch-edit-patch fails with the following message if there is binary
data (e.g. an image) in your patch:

dpatch-edit-patch: @DPATCH@ tag found, preserving dpatch header.
head: Binary file <filename> matches: invalid number of lines

This can be fixed trivially by applying the following patch:

/usr/bin/dpatch-edit-patch.orig 2011-08-16 09:04:23.000000000 +0100
+++ /usr/bin/dpatch-edit-patch 2011-08-22 15:55:26.000000000 +0100
@@ -355,7 +355,7 @@
dpep_message norm "Updating patch $OLDPATCH"
# Need another temporary file.
NEWPATCH="$(tempfile -m 666 -d "$WORKDIR")"
- DPEP_TAGLINENUM="$(grep -n '^@DPATCH@$' "$OLDPATCH" | head -n1 | cut -f1 -d:)"
+ DPEP_TAGLINENUM="$(grep -an '^@DPATCH@$' "$OLDPATCH" | head -n1 | cut -f1 -d:)"
if [ "$DPEP_TAGLINENUM" ]; then
# They have our tag, so we can preserve their headers.
dpep_message norm "@DPATCH@ tag found, preserving dpatch header."


Debian Release: 6.0.2
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages dpatch depends on:
ii bash 4.1-3 The GNU Bourne Again SHell

Versions of packages dpatch recommends:
ii dpkg-dev 1.15.8.11 Debian package development tools
ii fakeroot 1.14.4-1 Gives a fake root environment
ii patchutils 0.3.1-2 Utilities to work with patches

Versions of packages dpatch suggests:
ii curl 7.21.0-2 Get a file from an HTTP, HTTPS or




To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
email Follow the discussionReplies 1 replyReplies Make a reply

Similar topics

Replies

#1 Gergely Nagy
August 22nd, 2011 - 11:20 am ET | Report spam
tag 638864 + patch
found 638864 2.0.32
thanks

Ben Brown writes:

Package: dpatch
Version: 2.0.31
Severity: normal



This also affects 2.0.32, same patch should apply. I'll add it with the
next upload, thank you.

|8]




To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact
email Follow the discussion Replies Reply to this message
Help Create a new topicReplies Make a reply
Search Make your own search