index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2017-06-20 09:01:35 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2017-06-20 09:01:35 +0200 |
commit | 05e3561b3df4078a33865913d8135dbfe4ad5809 (patch) | |
tree | 9afde5a0c4d87187cc6e193c3666eb77a6a9a4cd /bin/return-assignment | |
parent | 797adfe1c1f26c57d31bc7b1b67e54d36257806f (diff) |
-rwxr-xr-x | bin/return-assignment | 28 |
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" |