From b7b8706cf9221a880f79262d98d507f6e64c3d07 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 14 Feb 2018 14:20:31 +0100 Subject: bin/get-package-updates: update git hashes in database, too --- bin/get-package-updates | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bin/get-package-updates b/bin/get-package-updates index abd380e..0b4d4f5 100755 --- a/bin/get-package-updates +++ b/bin/get-package-updates @@ -601,6 +601,15 @@ fi # shellcheck disable=SC2016 { + # update hashes of repositories in mysql database + for repo in ${repo_names}; do + printf 'UPDATE `git_repositories`' + printf ' SET `git_repositories`.`head`=from_base64("%s")' \ + "$(eval 'printf '"'"'%s'"'"' "${repo_revisions__'"${repo}"'}" | base64 -w0')" + printf ' WHERE `git_repositories`.`name`=from_base64("%s");\n' \ + "$(printf '%s' "${repo}" | base64 -w0)" + done + # move binary_packages from "to-be-decided" to "build-list" printf 'UPDATE `binary_packages`' printf ' JOIN `repositories` AS `from_repo`' printf ' ON `binary_packages`.`repository`=`from_repo`.`id`' -- cgit v1.2.3-70-g09d2