[pbuilder] 01/07: pbuilder-modules: Add new get_changes_options function

Mattia Rizzolo mattia at debian.org
Fri Jan 20 23:46:53 UTC 2017


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

mattia pushed a commit to branch master
in repository pbuilder.

commit 0ae60ea12ee7e36d6ab6b879d0e487b0d5165744
Author: James Clarke <jrtc27 at debian.org>
Date:   Thu Jan 19 00:23:10 2017 +0000

    pbuilder-modules: Add new get_changes_options function
    
    This extract options for dpkg-genchanges from DEBBUILDOPTS, allowing
    them to be passed to the new source-only dpkg-genchanges calls.
    
    Signed-off-by: Mattia Rizzolo <mattia at debian.org>
---
 pbuilder-modules | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/pbuilder-modules b/pbuilder-modules
index 141ab0d..827649f 100644
--- a/pbuilder-modules
+++ b/pbuilder-modules
@@ -918,6 +918,32 @@ b paraloop' \
     "$file"
 }
 
+function get_changes_options() {
+    local changes_options
+    local arg
+    for arg in $DEBBUILDOPTS; do
+        # 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'"
+                ;;
+            --changes-option=*)
+                changes_options="${changes_options:+$changes_options }'${arg#--changes-option=}'"
+                ;;
+            # dpkg-genchanges doesn't support the long form of some options
+            --release-by=*)
+                changes_options="${changes_options:+$changes_options }-m'${arg#--release-by=}'"
+                ;;
+            --build-by=*)
+                changes_options="${changes_options:+$changes_options }-e'${arg#--build-by=}'"
+                ;;
+        esac
+    done
+    echo "${changes_options:-}"
+}
+
 #==========================================================================
 # hooks stuff
 

-- 
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