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

guillem pushed a commit to branch master
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=25a8a2f05282bd5d0cc8568dfd0c7573e90b170a

commit 25a8a2f05282bd5d0cc8568dfd0c7573e90b170a
Author: Guillem Jover <[email protected]>
AuthorDate: Wed Oct 10 00:04:17 2018 +0200

    dpkg-maintscript-helper: Use explicit escape instead of literal backslash
    
    Warned-by: shellcheck
---
 debian/changelog                   | 4 ++++
 scripts/dpkg-maintscript-helper.sh | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index dd22eaab8..e6ab78fd8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,12 @@
 dpkg (1.19.3) UNRELEASED; urgency=medium
 
+  [ Guillem Jover ]
   * Packaging:
     - Bump Standards-Version to 4.2.1 (no changes needed).
     - Switch to debhelper compatibility level 11.
+  * Code internals:
+    - dpkg-maintscript-helper: Use an explicit escape instead of a literal
+      backslash.
 
   [ Updated programs translations ]
   * German (Sven Joachim).
diff --git a/scripts/dpkg-maintscript-helper.sh 
b/scripts/dpkg-maintscript-helper.sh
index de6c863c2..d501307e1 100755
--- a/scripts/dpkg-maintscript-helper.sh
+++ b/scripts/dpkg-maintscript-helper.sh
@@ -96,7 +96,7 @@ prepare_rm_conffile() {
        local md5sum old_md5sum
        md5sum="$(md5sum "$CONFFILE" | sed -e 's/ .*//')"
        old_md5sum="$(dpkg-query -W -f='${Conffiles}' "$PACKAGE" | \
-               sed -n -e "\'^ $CONFFILE ' { s/ obsolete$//; s/.* //; p }")"
+               sed -n -e "\\'^ $CONFFILE ' { s/ obsolete$//; s/.* //; p }")"
        if [ "$md5sum" != "$old_md5sum" ]; then
                mv -f "$CONFFILE" "$CONFFILE.dpkg-backup"
        else
@@ -207,7 +207,7 @@ prepare_mv_conffile() {
        local md5sum old_md5sum
        md5sum="$(md5sum "$CONFFILE" | sed -e 's/ .*//')"
        old_md5sum="$(dpkg-query -W -f='${Conffiles}' "$PACKAGE" | \
-               sed -n -e "\'^ $CONFFILE ' { s/ obsolete$//; s/.* //; p }")"
+               sed -n -e "\\'^ $CONFFILE ' { s/ obsolete$//; s/.* //; p }")"
        if [ "$md5sum" = "$old_md5sum" ]; then
                mv -f "$CONFFILE" "$CONFFILE.dpkg-remove"
        fi

-- 
Dpkg.Org's dpkg

Reply via email to