diff options
author | Antti-Juhani Kaijanaho <ajk@debian.org> | 2009-08-08 12:08:31 +0300 |
---|---|---|
committer | Antti-Juhani Kaijanaho <ajk@debian.org> | 2009-08-08 12:08:31 +0300 |
commit | f3d28abebf8210088cabdee6a9bf731181534817 (patch) | |
tree | 30bff1bfbf4b079cd3ba77041fa811fc2b0cc7a5 | |
parent | cfdfbcefc51b431193de39292cafee1fed5aba55 (diff) | |
download | dctrl-tools-f3d28abebf8210088cabdee6a9bf731181534817.tar.gz |
Fix Debian bug #511022.
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
-rw-r--r-- | debian/changelog | 7 | ||||
-rw-r--r-- | grep-dctrl/grep-dctrl.c | 1 | ||||
-rw-r--r-- | lib/paragraph.c | 2 | ||||
-rw-r--r-- | sort-dctrl/sort-dctrl.c | 1 | ||||
-rw-r--r-- | tests/bug511022.in | 1 | ||||
-rw-r--r-- | tests/bug511022.out | 1 | ||||
-rw-r--r-- | tests/bug511022.sh | 5 |
7 files changed, 16 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog index 3891b23..6b2e230 100644 --- a/debian/changelog +++ b/debian/changelog @@ -17,13 +17,18 @@ dctrl-tools (2.14) UNRELEASED; urgency=low Reported by Marco Túlio Gontijo e Silva <marcot@holoscopio.com>. * join-dctrl/join-dctrl.c: Avoid a compiler warning by initializing a local variable. + * lib/paragraph.c, grep-dctrl/grep-dctrl.c, sort-dctrl/sort-dctrl.c, + tests/bug511022.{sh.in,out}: + The whole paragraph no longer includes the final newline. + Closes: #511022 (the full paragraph should not include its final newline) + Reported by: Loïc Minier <lool@dooz.org> [ Stefano Zacchiroli ] * grep-dctrl: add new matching mode --whole-pkg/-w: it is an improved -e matching exact package names, i.e., no sub-string matching on package names. Closes: #383921 - -- Antti-Juhani Kaijanaho <ajk@debian.org> Sat, 08 Aug 2009 11:40:34 +0300 + -- Antti-Juhani Kaijanaho <ajk@debian.org> Sat, 08 Aug 2009 12:07:57 +0300 dctrl-tools (2.13.0) unstable; urgency=low diff --git a/grep-dctrl/grep-dctrl.c b/grep-dctrl/grep-dctrl.c index 7eab847..2783c4c 100644 --- a/grep-dctrl/grep-dctrl.c +++ b/grep-dctrl/grep-dctrl.c @@ -907,6 +907,7 @@ int main (int argc, char * argv[]) struct fsaf_read_rv r = get_whole_para(¶); fwrite(r.b, 1, r.len, stdout); putchar('\n'); + putchar('\n'); continue; } if (args.invert_show) { diff --git a/lib/paragraph.c b/lib/paragraph.c index f48fbcc..f67af94 100644 --- a/lib/paragraph.c +++ b/lib/paragraph.c @@ -219,7 +219,7 @@ FAIL: goto redo; END: - para->end = pos-1; + para->end = pos-2; pp->loc = para->end; pp->line = fsaf_getc(fp, pp->loc) == '\n' ? line-1 : line; } diff --git a/sort-dctrl/sort-dctrl.c b/sort-dctrl/sort-dctrl.c index 279d593..10a3a62 100644 --- a/sort-dctrl/sort-dctrl.c +++ b/sort-dctrl/sort-dctrl.c @@ -179,6 +179,7 @@ int main(int argc, char * argv[]) struct fsaf_read_rv r = get_whole_para(paras[i]); fwrite(r.b, 1, r.len, stdout); putchar('\n'); + putchar('\n'); } return 0; } diff --git a/tests/bug511022.in b/tests/bug511022.in new file mode 100644 index 0000000..fa5787c --- /dev/null +++ b/tests/bug511022.in @@ -0,0 +1 @@ +Package: gedit diff --git a/tests/bug511022.out b/tests/bug511022.out new file mode 100644 index 0000000..a09386a --- /dev/null +++ b/tests/bug511022.out @@ -0,0 +1 @@ +gedit diff --git a/tests/bug511022.sh b/tests/bug511022.sh new file mode 100644 index 0000000..79965a2 --- /dev/null +++ b/tests/bug511022.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +set -e + +$GREP_DCTRL -n -X -s Package "Package: gedit" |