Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/get-package-updates
diff options
context:
space:
mode:
Diffstat (limited to 'bin/get-package-updates')
-rwxr-xr-xbin/get-package-updates45
1 files changed, 22 insertions, 23 deletions
diff --git a/bin/get-package-updates b/bin/get-package-updates
index 4f91e6d..cc4497c 100755
--- a/bin/get-package-updates
+++ b/bin/get-package-updates
@@ -273,28 +273,27 @@ echo 'Check modified packages from the last update, and put them to the build li
# If a package is deleted, remove from the rebuild list, and add it to the deletion list.
# If a new package is added, then ensure that it's not on the deletion list.
-trigger_rebuild_on_any_file_sed_expression=$(
- # note: This only works for upstream sources!
- # shellcheck disable=SC2016
- {
- printf 'SELECT DISTINCT CONCAT('
- printf '`package_sources`.`pkgbase`,"/repos/",'
- printf '`upstream_repositories`.`name`,"-",'
- printf 'IF(`architectures`.`name`="any","any","x86_64"))'
- printf ' FROM `binary_packages`'
- mysql_join_binary_packages_binary_packages_in_repositories
- mysql_join_binary_packages_build_assignments
- mysql_join_build_assignments_architectures
- mysql_join_build_assignments_package_sources
- mysql_join_package_sources_upstream_repositories
- printf ' WHERE `binary_packages_in_repositories`.`repository`=%s;\n' \
- "${repository_ids__any_build_list}"
- } | \
- mysql_run_query | \
- sed '
- s@.*@s,^\\(.\\t\0/\\)[^/]\\+,\\1PKGBUILD,@
- '
-)
+# note: This only works for upstream sources!
+# shellcheck disable=SC2016
+{
+ printf 'SELECT DISTINCT CONCAT('
+ printf '`package_sources`.`pkgbase`,"/repos/",'
+ printf '`upstream_repositories`.`name`,"-",'
+ printf 'IF(`architectures`.`name`="any","any","x86_64"))'
+ printf ' FROM `binary_packages`'
+ mysql_join_binary_packages_binary_packages_in_repositories
+ mysql_join_binary_packages_build_assignments
+ mysql_join_build_assignments_architectures
+ mysql_join_build_assignments_package_sources
+ mysql_join_package_sources_upstream_repositories
+ printf ' WHERE `binary_packages_in_repositories`.`repository`=%s;\n' \
+ "${repository_ids__any_build_list}"
+} | \
+ mysql_run_query | \
+ sed '
+ s@.*@s,^\\(.\\t\0/\\)[^/]\\+,\\1PKGBUILD,@
+ ' > \
+ "${tmp_dir}/trigger-rebuild-on-any-file-sed-expression"
{
# trigger rebuild of packages removed from blacklist
@@ -344,7 +343,7 @@ trigger_rebuild_on_any_file_sed_expression=$(
git -C "${repo_path}" diff --no-renames --name-status "${old_repo_revision}" "${new_repo_revision}"
fi | \
# rename any file to "PKGBUILD" for packages on the build-list
- sed "${trigger_rebuild_on_any_file_sed_expression}" | \
+ sed -f "${tmp_dir}/trigger-rebuild-on-any-file-sed-expression" | \
# only track changes in PKGBUILDs
grep '/PKGBUILD$' | \
if [ "${repo}" = "archlinux32" ]; then