[pbuilder] 01/02: pbuilder-modules: Use more standard eval arg="$arg" to de-escape

James Clarke jrtc27 at moszumanska.debian.org
Thu Jan 19 18:10:05 UTC 2017


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

jrtc27 pushed a commit to branch wip/changes-option
in repository pbuilder.

commit ec835b3cd062563696cdcb366fb69aab93786a55
Author: James Clarke <jrtc27 at debian.org>
Date:   Thu Jan 19 18:01:24 2017 +0000

    pbuilder-modules: Use more standard eval arg="$arg" to de-escape
    
    Gbp-Dch: Ignore
---
 pbuilder-modules | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/pbuilder-modules b/pbuilder-modules
index e1c571c..8ab7624 100644
--- a/pbuilder-modules
+++ b/pbuilder-modules
@@ -921,10 +921,9 @@ b paraloop' \
 function get_changes_options() {
     local changes_options
     for arg in $DEBBUILDOPTS; do
-        # De-escape arg; is this really the easiest way?!
-        # $(echo $arg) on its own doesn't perform quote expansion, since quote
-        # expansion operates on the *original* word.
-        arg=$(bash -c "printf -- '%s' $arg")
+        # De-escape arg. $(echo $arg) on its own doesn't perform quote
+        # expansion, since quote expansion operates on the *original* word.
+        eval arg="$arg"
         case $arg in
             -s[iad]|-v*|-m*|-e*|-C*)
                 changes_options="${changes_options:+$changes_options }'$arg'"
@@ -947,10 +946,9 @@ function get_changes_options() {
 function should_clean_source() {
     local noclean=0
     for arg in $DEBBUILDOPTS; do
-        # De-escape arg; is this really the easiest way?!
-        # $(echo $arg) on its own doesn't perform quote expansion, since quote
-        # expansion operates on the *original* word.
-        arg=$(bash -c "printf -- '%s' $arg")
+        # De-escape arg. $(echo $arg) on its own doesn't perform quote
+        # expansion, since quote expansion operates on the *original* word.
+        eval arg="$arg"
         case $arg in
             --pre-clean)
                 noclean=0

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



More information about the Pbuilder-maint mailing list