pck_update: more changes on rpmbuildopt parameters ordering to workaround cross-arch builds

This is still a workaround to allow cross-arch builds with long rpm command lines
because it seems that rpmbuild is ignoring extra passed parameters when they
exceed a certain number (5 or 6 as far as I remember)
This commit is contained in:
Silvan Calarco 2014-09-26 13:28:11 +02:00
parent a2e617b4c2
commit 5058e2121b

View File

@ -2095,14 +2095,14 @@ ${proxy:+--proxy $proxy} ${proxy_user:+--proxy-user $proxy_user} \
# check if we are cross-compiling # check if we are cross-compiling
[ "$BUILD_ARCH" != "$target_cpu" ] && [ "$BUILD_ARCH" != "$target_cpu" ] &&
rpmbuild_opts="$rpmbuild_opts --target $target_cpu" USER_RPMDEFINE_OPTS="--target $target_cpu $USER_RPMDEFINE_OPTS"
[ "$cleanup" = "1" ] && rpmbuild_opts="$rpmbuild_opts --clean" [ "$cleanup" = "1" ] && rpmbuild_opts="$rpmbuild_opts --clean"
# note: exit with error when build requirements are missing # note: exit with error when build requirements are missing
notify.note "${NOTE}"$"testing out specfile""${NORM}..." notify.note "${NOTE}"$"testing out specfile""${NORM}..."
eval "rpmbuild --nobuild \ eval "rpmbuild --nobuild \
$rpmbuild_opts $rpm_root_opts $USER_RPMDEFINE_OPTS \ $USER_RPMDEFINE_OPTS $rpmbuild_opts $rpm_root_opts \
$SRPM_SPECFILE_WITH_PATH 2>&1" || $SRPM_SPECFILE_WITH_PATH 2>&1" ||
notify.error $"rpmbuild exited with error code":" \`$?'" notify.error $"rpmbuild exited with error code":" \`$?'"
@ -2149,18 +2149,18 @@ $SRPM_SPECFILE_WITH_PATH $USER_RPMDEFINE_OPTS 2>&1"
# as the dependencies check is done before, it is safe to pass # as the dependencies check is done before, it is safe to pass
# --nodeps to non-simulated build commands. # --nodeps to non-simulated build commands.
eval "\ eval "\
rpmbuild -bs $rpmbuild_opts --nodeps \ rpmbuild -bs $USER_RPMDEFINE_OPTS $rpmbuild_opts --nodeps \
$SRPM_SPECFILE_WITH_PATH $USER_RPMDEFINE_OPTS 2>&1" $SRPM_SPECFILE_WITH_PATH 2>&1"
elif [ "$nosrpm" = 1 ]; then elif [ "$nosrpm" = 1 ]; then
notify.note "${NOTE}"$"building the rpm packages""${NORM}..." notify.note "${NOTE}"$"building the rpm packages""${NORM}..."
eval "\ eval "\
rpmbuild -bb $rpmbuild_opts --nodeps \ rpmbuild -bb $USER_RPMDEFINE_OPTS $rpmbuild_opts --nodeps \
$SRPM_SPECFILE_WITH_PATH $USER_RPMDEFINE_OPTS 2>&1" $SRPM_SPECFILE_WITH_PATH 2>&1"
else else
notify.note "${NOTE}"$"building rpm and srpm packages""${NORM}..." notify.note "${NOTE}"$"building rpm and srpm packages""${NORM}..."
eval "\ eval "\
rpmbuild -ba $rpmbuild_opts --nodeps \ rpmbuild -ba $USER_RPMDEFINE_OPTS $rpmbuild_opts --nodeps \
$SRPM_SPECFILE_WITH_PATH $USER_RPMDEFINE_OPTS 2>&1" $SRPM_SPECFILE_WITH_PATH 2>&1"
fi fi
local rpmbuild_retcode="$?" local rpmbuild_retcode="$?"
if [ $rpmbuild_retcode -eq 0 ]; then if [ $rpmbuild_retcode -eq 0 ]; then