index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
-rwxr-xr-x | bin/harvest-commit-times | 44 |
diff --git a/bin/harvest-commit-times b/bin/harvest-commit-times index 7546aa4..0501fc5 100755 --- a/bin/harvest-commit-times +++ b/bin/harvest-commit-times @@ -91,37 +91,35 @@ while true; do printf '`package_sources`.`git_revision`,' printf '`package_sources`.`mod_git_revision`,' printf '`upstream_repositories`.`name`,' - printf '`git_repositories`.`name`' + printf 'IF(`build_assignments`.`architecture`=%s,"any","x86_64")' "${architecture_ids__any}" printf ' FROM `package_sources`' mysql_join_package_sources_upstream_repositories - mysql_join_upstream_repositories_git_repositories + mysql_join_package_sources_build_assignments printf ' WHERE `package_sources`.`commit_time`="0000-00-00 00:00:00"' printf ' AND `package_sources`.`uses_upstream`' if ! ${i_am_the_master}; then printf ' ORDER BY RAND()' fi printf ' LIMIT 10' - } | \ - mysql_run_query 'unimportant' | \ - sponge | \ - while read -r id pkgbase git_revision mod_git_revision repository git_repository; do - eval 'git_directory="${repo_paths__'"${git_repository}"'}"' - find_pkgbuilds "${pkgbase}" "${repository}" "${git_repository}" "${git_revision}" "${mod_git_revision}" - commit_time=$( - # shellcheck disable=SC2154 - git -C "${git_directory}" log -n 1 --pretty=format:%ct "${git_revision}" -- "${PKGBUILD}" - ) - if [ -n "${commit_time}" ]; then - printf '%s\t%s\n' \ - "${id}" \ - "${commit_time}" - else - >&2 printf 'Package source %s is not available in git.\n' \ - "${id}" - exit 2 - fi - done > \ - "${tmp_file}" + } \ + | mysql_run_query 'unimportant' \ + | sponge \ + | while read -r id pkgbase git_revision mod_git_revision repository architecture; do + commit_time=$( + # shellcheck disable=SC2154 + git -C "${repo_paths__state}" log -n 1 --pretty=format:%ct "${repository}-${architecture}/${pkgbase}" + ) + if [ -n "${commit_time}" ]; then + printf '%s\t%s\n' \ + "${id}" \ + "${commit_time}" + else + >&2 printf 'Package source %s is not available in git.\n' \ + "${id}" + exit 2 + fi + done > \ + "${tmp_file}" >&2 printf '.' |