index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-03-20 14:35:12 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-03-20 14:35:12 +0100 |
commit | b7f0199b15fb07d2532b12c627bf400783e7a115 (patch) | |
tree | 5d5ba66f0050277acff1a0add3b1c445bff2a61f /bin | |
parent | 6b86012dc547b674b8a5c347850e6ec3698433ee (diff) |
-rwxr-xr-x | bin/build-master-status-from-mysql | 21 | ||||
-rwxr-xr-x | bin/get-assignment | 6 | ||||
-rwxr-xr-x | bin/get-package-updates | 42 | ||||
-rwxr-xr-x | bin/return-assignment | 18 |
diff --git a/bin/build-master-status-from-mysql b/bin/build-master-status-from-mysql index 5f27d89..edabc1e 100755 --- a/bin/build-master-status-from-mysql +++ b/bin/build-master-status-from-mysql @@ -74,23 +74,6 @@ sort "${work_dir}/deletion-list" > \ # shellcheck disable=SC2016 { - printf 'SELECT `package_sources`.`pkgbase`' - printf ' FROM `package_sources`' - mysql_join_package_sources_build_assignments - mysql_join_build_assignments_build_dependency_loops - printf ';\n' -} | \ - mysql_run_query | \ - sort > \ - "${tmp_dir}/loops.mysql" -find "${work_dir}/build-list.loops" -regextype grep -mindepth 1 -maxdepth 1 \ - -regex '.*/loop_[0-9]\+' \ - -exec 'cat' '{}' \; | \ - sort > \ - "${tmp_dir}/loops.file" - -# shellcheck disable=SC2016 -{ printf 'SELECT ' printf '`binary_packages`.`%s`,' \ 'pkgname' \ @@ -221,10 +204,6 @@ find "${work_dir}/package-states" -mindepth 1 -maxdepth 1 \ "${tmp_dir}/deletion-list.mysql" || \ true diff -u \ - "${tmp_dir}/loops.file" \ - "${tmp_dir}/loops.mysql" >&2 || \ - true - diff -u \ "${tmp_dir}/tested.file" \ "${tmp_dir}/tested.mysql" || \ true diff --git a/bin/get-assignment b/bin/get-assignment index 2df3059..3357fc6 100755 --- a/bin/get-assignment +++ b/bin/get-assignment @@ -103,12 +103,6 @@ hand_out_assignment() { } | \ mysql_run_query - # lock every loop this package breaks - find "${work_dir}/build-list.loops" -maxdepth 1 -regextype grep \ - -regex '.*/loop_[0-9]\+' \ - -exec grep -qxF "$1" '{}' \; \ - -exec touch '{}.locked' \; - exit 0 } diff --git a/bin/get-package-updates b/bin/get-package-updates index a6c3f32..69c5e9b 100755 --- a/bin/get-package-updates +++ b/bin/get-package-updates @@ -528,7 +528,7 @@ echo 'Now actually sort it.' { # this part will have the correct build order, but all the infos are missing - tsort "${work_dir}/build-order" 2> "${work_dir}/tsort.error" | \ + tsort "${work_dir}/build-order" | \ nl -ba | \ awk '{print $1 " not-git also-not-git whatever " $2}' # this part has all the infos, but possibly the wrong order @@ -543,43 +543,6 @@ echo 'Now actually sort it.' awk '{print $5 " " $7 " " $8 " " $9}' > \ "${work_dir}/build-list.new.new" -rm --one-file-system -rf "${work_dir}/build-list.loops.new" -mkdir "${work_dir}/build-list.loops.new" - -if [ -s "${work_dir}/tsort.error" ]; then - >&2 echo 'WARNING: There is a dependency cycle!' - >&2 cat "${work_dir}/tsort.error" - >&2 echo - >&2 echo 'I will continue anyway.' - # save loops in separate files each, so breaking them is easier - awk ' - /^tsort: \S+: input contains a loop:$/{ - n++; - getline - } - { - print $2 >"'"${work_dir}"'/build-list.loops.new/loop_" n - } - ' "${work_dir}/tsort.error" - - # remove lines from loop files which are no packages - find "${work_dir}/build-list.loops.new" -maxdepth 1 -regextype grep \ - -regex '.*/loop_[0-9]\+' \ - -printf '%p\n' | \ - while read -r loop; do - { - sort -u "${loop}" - cut -d' ' -f1 "${work_dir}/build-list.new.new" | \ - sort -u - } | \ - sort | \ - uniq -d | \ - sponge "${loop}" - done -else - rm "${work_dir}/tsort.error" -fi - # shellcheck disable=SC2016 { # update hashes of repositories in mysql database @@ -608,9 +571,8 @@ mysql_find_build_assignment_loops # Move the .new-files to the actual files -rm -rf --one-file-system "${work_dir}/build-list.loops" { - printf '%s\n' "build-list.loops" "build-list.new" "build-list" "deletion-list" + printf '%s\n' "build-list.new" "build-list" "deletion-list" # shellcheck disable=SC2086 printf '%s.revision\n' ${repo_names} } | \ diff --git a/bin/return-assignment b/bin/return-assignment index c259f1c..b66244b 100755 --- a/bin/return-assignment +++ b/bin/return-assignment @@ -169,18 +169,6 @@ if [ "$5" = 'ERROR' ]; then if [ ! -s "${work_dir}/package-states/$1.$2.$3.$4.locked" ]; then 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=$( - find "${work_dir}/package-states/" -maxdepth 1 -name '*.locked' -printf '%f\n' | \ - sed 's@^\(.\+\)\.\([0-9a-f]\{40\}\.\)\{2\}[^.]\+\.locked$@\1@' - ) - find "${work_dir}/build-list.loops" -maxdepth 1 -regextype grep \ - -regex '.*/loop_[0-9]\+' \ - -exec grep -qxF "$1" '{}' \; \ - -not -exec grep -qxF "${locked_packages}" '{}' \; \ - -exec rm '{}.locked' \; - # move that build order to the end of the build-list sed -i ' /^'"$(str_to_regex "$1 $2 $3 $4")"'$/ { @@ -538,12 +526,6 @@ find "${work_dir}/package-states" -maxdepth 1 -regextype grep \ -not -regex '.*/'"$(str_to_regex "$1.$2.$3.$4")"'\.[^.]\+' \ -exec rm '{}' \; -# remove all loops which are broken by this package -find "${work_dir}/build-list.loops" -maxdepth 1 -regextype grep \ - -regex '.*/loop_[0-9]\+' \ - -exec grep -qxF "$1" '{}' \; \ - -exec rm '{}.locked' \; - # remove package from build list sed -i "/^$(str_to_regex "$1 $2 $3 $4")\$/d" "${work_dir}/build-list" |