提交 33b4eef5 authored 作者: Travis Cross's avatar Travis Cross

Add debian build option to keep pbuilder image config

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.
上级 b199aaad
......@@ -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
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论