index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
-rwxr-xr-x | bin/schedule-for-rebuild | 41 |
diff --git a/bin/schedule-for-rebuild b/bin/schedule-for-rebuild index 1998f40..de2d733 100755 --- a/bin/schedule-for-rebuild +++ b/bin/schedule-for-rebuild @@ -208,7 +208,16 @@ if [ -s "${tmp_dir}/package-regexes" ]; then printf 'SELECT DISTINCT ' printf '"any",' printf '`package_sources`.`pkgbase`,' - printf '`package_sources`.`git_revision`,' + printf 'IF(' + printf '`package_sources`.`uses_upstream`,' + printf '`package_sources`.`git_revision`,' + printf '"0000000000000000000000000000000000000000"' + printf '),' + printf 'IF(' + printf '`package_sources`.`uses_modification`,' + printf '`package_sources`.`mod_git_revision`,' + printf '"0000000000000000000000000000000000000000"' + printf '),' printf '`upstream_repositories`.`name`' printf ' FROM `names`' printf ' JOIN `package_sources`' @@ -219,7 +228,16 @@ if [ -s "${tmp_dir}/package-regexes" ]; then printf 'SELECT DISTINCT ' printf '"any",' printf '`package_sources`.`pkgbase`,' - printf '`package_sources`.`git_revision`,' + printf 'IF(' + printf '`package_sources`.`uses_upstream`,' + printf '`package_sources`.`git_revision`,' + printf '"0000000000000000000000000000000000000000"' + printf '),' + printf 'IF(' + printf '`package_sources`.`uses_modification`,' + printf '`package_sources`.`mod_git_revision`,' + printf '"0000000000000000000000000000000000000000"' + printf '),' printf '`upstream_repositories`.`name`' printf ' FROM `binary_packages`' mysql_join_binary_packages_build_assignments @@ -365,7 +383,16 @@ if ${auto}; then printf 'SELECT DISTINCT ' printf '`ba_a`.`name`,' printf '`package_sources`.`pkgbase`,' - printf '`package_sources`.`git_revision`,' + printf 'IF(' + printf '`package_sources`.`uses_upstream`,' + printf '`package_sources`.`git_revision`,' + printf '"0000000000000000000000000000000000000000"' + printf '),' + printf 'IF(' + printf '`package_sources`.`uses_modification`,' + printf '`package_sources`.`mod_git_revision`,' + printf '"0000000000000000000000000000000000000000"' + printf '),' printf '`upstream_repositories`.`name`' printf ' FROM `least_stable_bp`' printf ' JOIN `binary_packages`' @@ -446,14 +473,14 @@ sort -u "${tmp_dir}/pkgbases" \ # get the current HEADs if ${update}; then - cut -d' ' -f 2,3,4 "${tmp_dir}/pkgbases" \ + cut -d' ' -f 2,3,4,5 "${tmp_dir}/pkgbases" \ | sort -u \ - | while read -r pkgbase git_rev repo; do + | while read -r pkgbase git_rev git_mod_rev repo; do success=false # shellcheck disable=SC2154 - printf '%s ' "${pkgbase}" "${git_rev}" "${repo_heads__archlinux32}" "${repo}" \ + printf '%s ' "${pkgbase}" "${git_rev}" "${git_mod_rev}" "${repo_heads__archlinux32}" "${repo}" \ | sed 's/ $/\n/' - if ! mysql_generate_package_metadata "${repository_ids__any_build_list}" "${pkgbase}" "${git_rev}" "${repo_heads__archlinux32}" "${repo}" && \ + if ! mysql_generate_package_metadata "${repository_ids__any_build_list}" "${pkgbase}" "${git_rev}" "${git_mod_rev}" "${repo}" && \ ! ${ignore_mysql_generate_package_metadata_errors}; then exit 2 fi |