Commit 5058e2121bfdc1ad673583a6f55d0e20000aa2f1
1 parent
a2e617b4c2
Exists in
master
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)
Showing 1 changed file with 8 additions and 8 deletions Side-by-side Diff
plugins/pck-update.in
... | ... | @@ -2095,14 +2095,14 @@ |
2095 | 2095 | |
2096 | 2096 | # check if we are cross-compiling |
2097 | 2097 | [ "$BUILD_ARCH" != "$target_cpu" ] && |
2098 | - rpmbuild_opts="$rpmbuild_opts --target $target_cpu" | |
2098 | + USER_RPMDEFINE_OPTS="--target $target_cpu $USER_RPMDEFINE_OPTS" | |
2099 | 2099 | |
2100 | 2100 | [ "$cleanup" = "1" ] && rpmbuild_opts="$rpmbuild_opts --clean" |
2101 | 2101 | |
2102 | 2102 | # note: exit with error when build requirements are missing |
2103 | 2103 | notify.note "${NOTE}"$"testing out specfile""${NORM}..." |
2104 | 2104 | eval "rpmbuild --nobuild \ |
2105 | -$rpmbuild_opts $rpm_root_opts $USER_RPMDEFINE_OPTS \ | |
2105 | +$USER_RPMDEFINE_OPTS $rpmbuild_opts $rpm_root_opts \ | |
2106 | 2106 | $SRPM_SPECFILE_WITH_PATH 2>&1" || |
2107 | 2107 | notify.error $"rpmbuild exited with error code":" \`$?'" |
2108 | 2108 | |
2109 | 2109 | |
2110 | 2110 | |
... | ... | @@ -2149,18 +2149,18 @@ |
2149 | 2149 | # as the dependencies check is done before, it is safe to pass |
2150 | 2150 | # --nodeps to non-simulated build commands. |
2151 | 2151 | eval "\ |
2152 | -rpmbuild -bs $rpmbuild_opts --nodeps \ | |
2153 | -$SRPM_SPECFILE_WITH_PATH $USER_RPMDEFINE_OPTS 2>&1" | |
2152 | +rpmbuild -bs $USER_RPMDEFINE_OPTS $rpmbuild_opts --nodeps \ | |
2153 | +$SRPM_SPECFILE_WITH_PATH 2>&1" | |
2154 | 2154 | elif [ "$nosrpm" = 1 ]; then |
2155 | 2155 | notify.note "${NOTE}"$"building the rpm packages""${NORM}..." |
2156 | 2156 | eval "\ |
2157 | -rpmbuild -bb $rpmbuild_opts --nodeps \ | |
2158 | -$SRPM_SPECFILE_WITH_PATH $USER_RPMDEFINE_OPTS 2>&1" | |
2157 | +rpmbuild -bb $USER_RPMDEFINE_OPTS $rpmbuild_opts --nodeps \ | |
2158 | +$SRPM_SPECFILE_WITH_PATH 2>&1" | |
2159 | 2159 | else |
2160 | 2160 | notify.note "${NOTE}"$"building rpm and srpm packages""${NORM}..." |
2161 | 2161 | eval "\ |
2162 | -rpmbuild -ba $rpmbuild_opts --nodeps \ | |
2163 | -$SRPM_SPECFILE_WITH_PATH $USER_RPMDEFINE_OPTS 2>&1" | |
2162 | +rpmbuild -ba $USER_RPMDEFINE_OPTS $rpmbuild_opts --nodeps \ | |
2163 | +$SRPM_SPECFILE_WITH_PATH 2>&1" | |
2164 | 2164 | fi |
2165 | 2165 | local rpmbuild_retcode="$?" |
2166 | 2166 | if [ $rpmbuild_retcode -eq 0 ]; then |