From 8067ad924136c771eb4976279c9f8b6b75b1258b Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 16 Nov 2017 11:48:17 +0100 Subject: bin/get-package-updates: If a package is still on the build list, a change of _any_ source file will trigger a bump of its git-revisions. --- bin/get-package-updates | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'bin/get-package-updates') diff --git a/bin/get-package-updates b/bin/get-package-updates index fda84ba..40a5227 100755 --- a/bin/get-package-updates +++ b/bin/get-package-updates @@ -141,10 +141,6 @@ cp \ "${work_dir}/deletion-list" \ "${work_dir}/deletion-list.new" -# TODO: Only tracking PKGBUILDs is ineffective if some error outside of the PKGBUILD (e.g. a missing source file) -# is corrected upstream. On the other hand, changing files next to a PKGBUILD should not trigger a rebuild -# if the package was already built successfully. - for repo in ${repo_names}; do eval repo_path='"${repo_paths__'"${repo}"'}"' eval old_repo_revision='"${old_repo_revisions__'"${repo}"'}"' @@ -160,6 +156,25 @@ for repo in ${repo_names}; do git -C "${repo_path}" diff --no-renames --name-status "${old_repo_revision}" "${new_repo_revision}" fi } | \ + # Packages which are already on the build list should receive a git_revision bump if _any_ file changed. + # Thus, we rename any file "PKGBUILD" to trigger the successive logic. + if [ "${repo}" = 'archlinux32' ]; then + sed "$( + sed ' + s/ .*$// + s|^|\\@^.\\t[^/]\\+/| + s|$|/@ s@/[^/]*$@/PKGBUILD@| + ' "${work_dir}/build-list" + )" + else + sed "$( + sed ' + s/ .*$// + s|^|\\@^.\\t| + s|$|/@ s@/[^/]*$@/PKGBUILD@| + ' "${work_dir}/build-list" + )" + fi | \ # only track changes in PKGBUILDs grep '/PKGBUILD$' | \ if [ "${repo}" = "archlinux32" ]; then -- cgit v1.2.3-70-g09d2