[pbuilder] 02/03: pbuilder-modules: Add get_source_options function to extract options for dpkg-source from DEBBUILDOPTS
James Clarke
jrtc27 at moszumanska.debian.org
Tue Jan 24 14:49:34 UTC 2017
This is an automated email from the git hooks/post-receive script.
jrtc27 pushed a commit to branch master
in repository pbuilder.
commit 81505f00f4d30aecdae6603209a6b4582854cf0e
Author: James Clarke <jrtc27 at debian.org>
Date: Tue Jan 24 14:31:39 2017 +0000
pbuilder-modules: Add get_source_options function to extract options for dpkg-source from DEBBUILDOPTS
---
pbuilder-modules | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/pbuilder-modules b/pbuilder-modules
index 012d378..8703042 100644
--- a/pbuilder-modules
+++ b/pbuilder-modules
@@ -964,6 +964,41 @@ function should_clean_source() {
return $noclean
}
+function get_source_options() {
+ local source_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[nsAkurKUR]|-z*|-Z*|-i*|-I*)
+ source_options="${source_options:+$source_options }'$arg'"
+ ;;
+ --source-option=*)
+ source_options="${source_options:+$source_options }'${arg#--source-option=}'"
+ ;;
+ # Pre-squeeze dpkg-source doesn't support the long forms.
+ # Since this is only used by pdebuild outside the chroot, it should
+ # be safe to keep the long forms, but it does no harm to keep
+ # backwards compatibility.
+ --compression-level=*)
+ source_options="${source_options:+$source_options }-z'${arg#--compression-level=}'"
+ ;;
+ --compression=*)
+ source_options="${source_options:+$source_options }-Z'${arg#--compression=}'"
+ ;;
+ --diff-ignore=*)
+ source_options="${source_options:+$source_options }-i'${arg#--diff-ignore=}'"
+ ;;
+ --tar-ignore=*)
+ source_options="${source_options:+$source_options }-I'${arg#--tar-ignore=}'"
+ ;;
+ esac
+ done
+ echo "${source_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