diff options
author | Erich Eckner <git@eckner.net> | 2017-11-16 11:48:17 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2017-11-16 11:48:17 +0100 |
commit | 8067ad924136c771eb4976279c9f8b6b75b1258b (patch) | |
tree | 68559dddef0f4fb208a1c34d537aa2cd32927b8a | |
parent | 252c091b42d1c4e03563e439e333706d366dcb96 (diff) | |
download | builder-8067ad924136c771eb4976279c9f8b6b75b1258b.tar.xz |
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.
-rwxr-xr-x | bin/get-package-updates | 23 |
1 files changed, 19 insertions, 4 deletions
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 |