From 05e3561b3df4078a33865913d8135dbfe4ad5809 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 20 Jun 2017 09:01:35 +0200 Subject: hand out broken packages multiple times --- bin/return-assignment | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) (limited to 'bin/return-assignment') diff --git a/bin/return-assignment b/bin/return-assignment index ec7db45..213d4f0 100755 --- a/bin/return-assignment +++ b/bin/return-assignment @@ -48,10 +48,12 @@ if [ "$5" = 'ERROR' ]; then exit 0 fi - mv \ - "${work_dir}/package-states/$1.$2.$3.$4.locked" \ + cat \ + "${work_dir}/package-states/$1.$2.$3.$4.locked" >> \ "${work_dir}/package-states/$1.$2.$3.$4.broken" + rm "${work_dir}/package-states/$1.$2.$3.$4.locked" + # unlock every loop this package would have broken and which is not # broken by another locked package locked_packages="$( @@ -74,6 +76,14 @@ if [ "$5" = 'ERROR' ]; then fi done + # move build order to end of build list + + sed -i \ + "/^$(str_to_regex "$1 $2 $3 $4")\$/d" \ + "${work_dir}/build-list" + echo "$1 $2 $3 $4" >> \ + "${work_dir}/build-list" + exit 0 fi @@ -152,8 +162,8 @@ repo-add "${destination}.db.tar.gz" ${packages} ${master_mirror_command} \ "${destination}.db."* \ - *".pkg.tar.xz" \ - *".pkg.tar.xz.sig" \ + ./*".pkg.tar.xz" \ + ./*".pkg.tar.xz.sig" \ "${master_mirror_directory}/i686/${destination}/" for package in ${packages}; do @@ -175,10 +185,18 @@ grep -xF "$1" "${work_dir}/build-list.loops/loop_"* 2> /dev/null | \ sed 'p;s|$|.locked|' | \ xargs -rn1 rm -f +if ! ls "${work_dir}/build-list.loops" | \ + grep -q '^loop_[0-9]\+$'; then + # no loops left + sed -i '/^break_loops$/d' "${work_dir}/build-list" +fi + # remove package from build list sed -i "/^$(str_to_regex "$1 $2 $3 $4")\$/d" "${work_dir}/build-list" # remove package lock file printf '%s\n' ${packages} > \ "${work_dir}/package-states/$1.$2.$3.$4.done" -rm "${work_dir}/package-states/$1.$2.$3.$4.locked" +rm -f \ + "${work_dir}/package-states/$1.$2.$3.$4.locked" \ + "${work_dir}/package-states/$1.$2.$3.$4.broken" -- cgit v1.2.3-70-g09d2