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:
parent
a2e617b4c2
commit
5058e2121b
@ -2095,14 +2095,14 @@ ${proxy:+--proxy $proxy} ${proxy_user:+--proxy-user $proxy_user} \
|
||||
|
||||
# check if we are cross-compiling
|
||||
[ "$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"
|
||||
|
||||
# note: exit with error when build requirements are missing
|
||||
notify.note "${NOTE}"$"testing out specfile""${NORM}..."
|
||||
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" ||
|
||||
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
|
||||
# --nodeps to non-simulated build commands.
|
||||
eval "\
|
||||
rpmbuild -bs $rpmbuild_opts --nodeps \
|
||||
$SRPM_SPECFILE_WITH_PATH $USER_RPMDEFINE_OPTS 2>&1"
|
||||
rpmbuild -bs $USER_RPMDEFINE_OPTS $rpmbuild_opts --nodeps \
|
||||
$SRPM_SPECFILE_WITH_PATH 2>&1"
|
||||
elif [ "$nosrpm" = 1 ]; then
|
||||
notify.note "${NOTE}"$"building the rpm packages""${NORM}..."
|
||||
eval "\
|
||||
rpmbuild -bb $rpmbuild_opts --nodeps \
|
||||
$SRPM_SPECFILE_WITH_PATH $USER_RPMDEFINE_OPTS 2>&1"
|
||||
rpmbuild -bb $USER_RPMDEFINE_OPTS $rpmbuild_opts --nodeps \
|
||||
$SRPM_SPECFILE_WITH_PATH 2>&1"
|
||||
else
|
||||
notify.note "${NOTE}"$"building rpm and srpm packages""${NORM}..."
|
||||
eval "\
|
||||
rpmbuild -ba $rpmbuild_opts --nodeps \
|
||||
$SRPM_SPECFILE_WITH_PATH $USER_RPMDEFINE_OPTS 2>&1"
|
||||
rpmbuild -ba $USER_RPMDEFINE_OPTS $rpmbuild_opts --nodeps \
|
||||
$SRPM_SPECFILE_WITH_PATH 2>&1"
|
||||
fi
|
||||
local rpmbuild_retcode="$?"
|
||||
if [ $rpmbuild_retcode -eq 0 ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user