]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Add debian build option to keep pbuilder image config
authorTravis Cross <tc@traviscross.com>
Wed, 8 Oct 2014 19:09:03 +0000 (19:09 +0000)
committerTravis Cross <tc@traviscross.com>
Wed, 8 Oct 2014 20:41:37 +0000 (20:41 +0000)
Normally we override the config of each pbuilder/cowbuilder image when
we update the image before using it for the build.  Passing this
option allows for using an existing cowbuilder image (assuming it's in
the correct location) with some existing desirable configuration.

debian/util.sh

index b15bf5395a9c457e69387d7d98e3b108a6925108..d311a41a42c7cf1bddd777614be16480ec826372 100755 (executable)
@@ -267,11 +267,13 @@ build_debs () {
   {
     set -e
     local OPTIND OPTARG debug_hook=false hookdir="" cow_build_opts=""
-    while getopts 'Bbd' o "$@"; do
+    local keep_pbuilder_config=false
+    while getopts 'Bbdk' o "$@"; do
       case "$o" in
         B) cow_build_opts="--debbuildopts '-B'";;
         b) cow_build_opts="--debbuildopts '-b'";;
         d) debug_hook=true;;
+        k) keep_pbuilder_config=true;;
       esac
     done
     shift $(($OPTIND-1))
@@ -302,7 +304,9 @@ build_debs () {
     fi
     announce "Updating base $distro-$arch image..."
     local x=30
-    while ! cow --update --override-config; do
+    local opts="--override-config"
+    $keep_pbuilder_config && opts=""
+    while ! cow --update $opts; do
       [ $x -lt 1 ] && break; sleep 120; x=$((x-1))
     done
     announce "Building $distro-$arch DEBs from $dsc..."
@@ -324,7 +328,7 @@ build_all () {
   local OPTIND OPTARG
   local orig_opts="" dsc_opts="" deb_opts="" modlist=""
   local archs="" distros="" orig="" depinst=false par=false
-  while getopts 'a:bc:df:ijl:m:no:s:u:v:z:' o "$@"; do
+  while getopts 'a:bc:df:ijkl:m:no:s:u:v:z:' o "$@"; do
     case "$o" in
       a) archs="$archs $OPTARG";;
       b) orig_opts="$orig_opts -b";;
@@ -333,6 +337,7 @@ build_all () {
       f) dsc_opts="$dsc_opts -f$OPTARG";;
       i) depinst=true;;
       j) par=true;;
+      k) deb_opts="$deb_opts -k";;
       l) modlist="$OPTARG";;
       m) orig_opts="$orig_opts -m$OPTARG"; dsc_opts="$dsc_opts -m$OPTARG";;
       n) orig_opts="$orig_opts -n";;
@@ -416,6 +421,7 @@ commands:
       Build only modules listed in this file
     -i Auto install build deps on host system
     -j Build debs in parallel
+    -k Don't override pbuilder image configurations
     -l <modules>
     -m [ quicktest | non-dfsg ]
       Choose custom list of modules to build
@@ -436,6 +442,7 @@ commands:
     -B Binary architecture-dependent build
     -b Binary-only build
     -d Enable cowbuilder debug hook
+    -k Don't override pbuilder image configurations
 
   create-dbg-pkgs