summaryrefslogtreecommitdiff
path: root/bin/return-assignment
diff options
context:
space:
mode:
Diffstat (limited to 'bin/return-assignment')
-rwxr-xr-xbin/return-assignment42
1 files changed, 27 insertions, 15 deletions
diff --git a/bin/return-assignment b/bin/return-assignment
index 6b64bf4..eca5af7 100755
--- a/bin/return-assignment
+++ b/bin/return-assignment
@@ -142,25 +142,25 @@ if [ "$6" = 'ERROR' ]; then
exit 2
fi
build_assignment_architecture="${infos##* }"
- infos="${infos% ${build_assignment_architecture}}"
+ infos="${infos% "${build_assignment_architecture}"}"
pkgrel="${infos##* }"
- infos="${infos% ${pkgrel}}"
+ infos="${infos% "${pkgrel}"}"
epoch="${infos##* }"
- infos="${infos% ${epoch}}"
+ infos="${infos% "${epoch}"}"
pkgver="${infos##* }"
- infos="${infos% ${pkgver}}"
+ infos="${infos% "${pkgver}"}"
pkgver=$(
printf '%s' "${pkgver}" \
| base64 -d
)
upstream_flag_date="${infos##* }"
- infos="${infos% ${upstream_flag_date}}"
+ infos="${infos% "${upstream_flag_date}"}"
upstream_flag_date=$(
printf '%s' "${upstream_flag_date}" \
| base64 -d
)
was_broken_before="${infos##* }"
- build_assignment_id="${infos% ${was_broken_before}}"
+ build_assignment_id="${infos% "${was_broken_before}"}"
# save sent build logs
saved_build_logs=$(
@@ -314,7 +314,10 @@ if [ "$6" = 'ERROR' ]; then
' | \
tr ' ' '\n' | \
sed '
- 1,2 d
+ /^Packages$/ {
+ N
+ d
+ }
/^\s*$/d
p
s/^haskell-//
@@ -373,6 +376,18 @@ if [ "$6" = 'ERROR' ]; then
tr ' ' '\t' > \
"${tmp_dir}/broken-packages-with-version"
+# TODO: We might want to prioritize broken dependencies, which are already
+# on the build-list.
+
+# TODO: We might also want to prioritize the returned package if there
+# were broken dependencies identified, but none of these is still on the
+# build list (e.g. some race condition between this build and its
+# dependencies occured).
+
+# TODO: Iff broken dependencies were rescheduled or prioritized, we
+# should raise the priority of the returned package to one less than the
+# maximum value (so it will be rebuilt after the broken dependencies).
+
# now we look if the broken packages have been rebuilt in the meantime
haskell_rebuild_packages=$(
# shellcheck disable=SC2016
@@ -517,10 +532,7 @@ if [ "$6" = 'ERROR' ]; then
{
printf '%s/%s ' \
"${build_assignment_architecture}" \
- "$1" \
- | sed '
- s/[+]/%2B/g
- '
+ "$1"
if [ "${1%s}s" = "$1" ]; then
printf 'are'
else
@@ -532,9 +544,6 @@ if [ "$6" = 'ERROR' ]; then
# shellcheck disable=SC2154
printf ' broken (says %s)' \
"${slave}"
- if [ "$1" = 'electron' ] || [ "$1" = 'electron2' ]; then
- printf -- ' - as usual'
- fi
if [ -n "${rescheduled_packages}" ]; then
printf -- ' - I rescheduled:'
# shellcheck disable=SC2086
@@ -547,7 +556,10 @@ if [ "$6" = 'ERROR' ]; then
fi
printf ': https://archlinux32.org/buildmaster/build-log.php?a=%s&p=%s\n' \
"${build_assignment_architecture}" \
- "$1"
+ "$1" \
+ | sed '
+ s/[+]/%2B/g
+ '
} | \
irc_say
fi