[Dctrl-tools-devel] [SCM] Debian control file query tools branch, master, updated. 2.11-45-gf3d28ab

Antti-Juhani Kaijanaho ajk at debian.org
Sat Aug 8 09:08:39 UTC 2009


The following commit has been merged in the master branch:
commit f3d28abebf8210088cabdee6a9bf731181534817
Author: Antti-Juhani Kaijanaho <ajk at debian.org>
Date:   Sat Aug 8 12:08:31 2009 +0300

    Fix Debian bug #511022.
    
    Signed-off-by: Antti-Juhani Kaijanaho <ajk at debian.org>

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 at 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 at 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 at debian.org>  Sat, 08 Aug 2009 11:40:34 +0300
+ -- Antti-Juhani Kaijanaho <ajk at 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(&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"

-- 
Debian control file query tools



More information about the Dctrl-tools-devel mailing list