[debhelper-devel] [debhelper] 01/01: addsubstvar: Pass -a to grep to handle substvars with unicode content gracefully (Closes: #815620)

Niels Thykier nthykier at moszumanska.debian.org
Tue Feb 23 18:00:47 UTC 2016


This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository debhelper.

commit 9ca73a0a80fcfc93c1f47e41c61318b038f4e2da
Author: Joachim Breitner <nomeata at debian.org>
Date:   Tue Feb 23 10:23:29 2016 +0100

    addsubstvar: Pass -a to grep to handle substvars with unicode content gracefully (Closes: #815620)
    
    Signed-off-by: Niels Thykier <niels at thykier.net>
---
 Debian/Debhelper/Dh_Lib.pm | 4 ++--
 debian/changelog           | 5 +++++
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm
index a6f1e00..2baf029 100644
--- a/Debian/Debhelper/Dh_Lib.pm
+++ b/Debian/Debhelper/Dh_Lib.pm
@@ -703,7 +703,7 @@ sub delsubstvar {
 	my $substvarfile="debian/${ext}substvars";
 
 	if (-e $substvarfile) {
-		complex_doit("grep -s -v '^${substvar}=' $substvarfile > $substvarfile.new || true");
+		complex_doit("grep -a -s -v '^${substvar}=' $substvarfile > $substvarfile.new || true");
 		doit("mv", "$substvarfile.new","$substvarfile");
 	}
 }
@@ -750,7 +750,7 @@ sub addsubstvar {
 	}
 
 	if (length $line) {
-		 complex_doit("(grep -s -v ${substvar} $substvarfile; echo ".escape_shell("${substvar}=$line").") > $substvarfile.new");
+		 complex_doit("(grep -a -s -v ${substvar} $substvarfile; echo ".escape_shell("${substvar}=$line").") > $substvarfile.new");
 		 doit("mv", "$substvarfile.new", $substvarfile);
 	}
 	else {
diff --git a/debian/changelog b/debian/changelog
index 9b1eb99..2a91861 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,6 @@
 debhelper (9.20160116) UNRELEASED; urgency=medium
 
+  [ Niels Thykier ]
   * Remove dh_suidregister and related autoscripts.  No package
     (that can be built in unstable) invokes this tool.
   * dh: Do not create stamp files when running with --no-act.
@@ -26,6 +27,10 @@ debhelper (9.20160116) UNRELEASED; urgency=medium
   * cmake.pm: Apply patch from Helmut Grohne to correct the
     name of the default cross compilers.  (Closes: #812136)
 
+  [ Joachim Breitner ]
+  * addsubstvar: Pass -a to grep to handle substvars with unicode content
+    gracefully (Closes: #815620)
+
  -- Niels Thykier <niels at thykier.net>  Sat, 16 Jan 2016 13:23:00 +0000
 
 debhelper (9.20160115) unstable; urgency=medium

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debhelper/debhelper.git




More information about the debhelper-devel mailing list