Skip to content

Commit 3f18377

Browse files
authored
Allow the '--buildtool-opt' option to be used multiple times to pass multiple options to the underlying build tool (openSUSE#930)
1 parent c1e794e commit 3f18377

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

build-recipe

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
BUILDTYPE=
2626
KIWI_PARAMETERS=
2727
BUILD_SKIP_BUNDLE=
28+
BUILD_TOOL_OPTS=()
2829
RPM_BUILD_IN_PLACE=
2930
RPM_RECIPE_IN_SUBDIR=
3031
RPM_NOPREP=
@@ -70,7 +71,7 @@ recipe_parse_options() {
7071
case ${PARAM/#--/-} in
7172
-buildtool-opt)
7273
needarg
73-
BUILD_TOOL_OPT="$ARG"
74+
BUILD_TOOL_OPTS[${#BUILD_TOOL_OPTS[@]}]=$ARG
7475
shift
7576
;;
7677
-stage)

build-recipe-spec

+4-2
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,10 @@ recipe_build_spec() {
179179

180180
# XXX: move _srcdefattr to macro file?
181181
rpmbopts=("--define" "_srcdefattr (-,root,root)")
182-
if test -n "$BUILD_TOOL_OPT" ; then
183-
rpmbopts[${#rpmbopts[@]}]="$BUILD_TOOL_OPT"
182+
if test -n "$BUILD_TOOL_OPTS" ; then
183+
for opt in ${BUILD_TOOL_OPTS[@]}; do
184+
rpmbopts[${#rpmbopts[@]}]=$opt
185+
done
184186
fi
185187
if test "$DO_CHECKS" != true ; then
186188
if chroot "$BUILD_ROOT" "$rpmbuild" --nocheck --help >/dev/null 2>&1; then

0 commit comments

Comments
 (0)