summaryrefslogtreecommitdiff
path: root/bin/build-packages
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-04-15 09:33:23 +0200
committerErich Eckner <git@eckner.net>2019-04-15 09:33:23 +0200
commitf11e9fd8d4b8b91ecf7d320bea96babb5531cf36 (patch)
tree7bdebb077f1a7ef9520dc972fcc948c638cabfeb /bin/build-packages
parent9a82ed08075a94a1da785a8797ad9b6e3304f6e1 (diff)
downloadbuilder-f11e9fd8d4b8b91ecf7d320bea96babb5531cf36.tar.xz
bin/build-packages: fall back to $my_arch if build master does not tell us which architecture that package should be built on
Diffstat (limited to 'bin/build-packages')
-rwxr-xr-xbin/build-packages26
1 files changed, 16 insertions, 10 deletions
diff --git a/bin/build-packages b/bin/build-packages
index 447c15c..c50681c 100755
--- a/bin/build-packages
+++ b/bin/build-packages
@@ -207,14 +207,14 @@ while [ "${count}" -ne 0 ] && \
err=0
case "$(uname -m)" in
'i486')
- arch='i486'
+ my_arch='i486'
;;
'i686'|'x86_64')
if grep '^flags\s*:' '/proc/cpuinfo' | \
grep -qwF 'sse2'; then
- arch='pentium4'
+ my_arch='pentium4'
else
- arch='i686'
+ my_arch='i686'
fi
;;
*)
@@ -233,7 +233,7 @@ while [ "${count}" -ne 0 ] && \
-i "${master_build_server_identity}" \
-p "${master_build_server_port}" \
"${master_build_server_user}@${master_build_server}" \
- 'get-assignment' "${arch}" "${prefered_package}"
+ 'get-assignment' "${my_arch}" "${prefered_package}"
) || err=$?
expected_packages=$(
printf '%s\n' "${package}" | \
@@ -247,7 +247,7 @@ while [ "${count}" -ne 0 ] && \
package=$(
echo "${forced_package}" | \
sed '
- s|\.\([^.]\+\)\.\([^.]\+\)\.\([^.]\+\)$| \1 \2 \3|
+ s|\.\([^.]\+\)\.\([^.]\+\)\.\([^.]\+\)\.\([^.]\+\)$| \1 \2 \3 \4|
'
)
expected_packages=''
@@ -259,6 +259,8 @@ while [ "${count}" -ne 0 ] && \
0)
[ ${count} -gt 0 ] && \
count=$((count-1))
+ arch="${package##* }"
+ package="${package% *}"
sub_pkgrel="${package##* }"
package="${package% *}"
repository="${package##* }"
@@ -267,14 +269,18 @@ while [ "${count}" -ne 0 ] && \
package="${package% *}"
git_revision="${package##* }"
if [ "${git_revision}" = "${package}" ]; then
- # build master did not tell us a sub_pkgrel
+ # build master did not tell us an architecture
git_revision="${mod_git_revision}"
mod_git_revision="${repository}"
repository="${sub_pkgrel}"
- sub_pkgrel='0'
+ sub_pkgrel="${arch}"
+ arch="${my_arch}"
else
package="${package% *}"
fi
+ if [ "${arch}" = 'any' ]; then
+ arch="${my_arch}"
+ fi
if [ -z "${forced_straws}" ] && \
printf '%s\n' "${package}" | \
@@ -488,10 +494,10 @@ while [ "${count}" -ne 0 ] && \
>&2 echo 'Because straw :without_systemd_nspawn: is active, I will abort.'
exit 2
fi
- if ! uname -m | \
- grep -qxF "${arch}"; then
+ if uname -m | \
+ grep -qxF 'x86_64'; then
>&2 echo 'straw :without_systemd_nspawn: requires running build-packages on the'
- >&2 echo 'architecture for which the package should be built:'
+ >&2 echo 'architecture for which the package should be built.'
>&2 printf '"%s" != "%s"\n' \
"$(uname -m)" \
"${arch}"