summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-02-14 14:20:31 +0100
committerErich Eckner <git@eckner.net>2018-02-14 14:20:31 +0100
commitb7b8706cf9221a880f79262d98d507f6e64c3d07 (patch)
tree62402514d6a030ddc1cdbbc99667e60c7248ffc1 /bin
parenta844091fa0913b7b18b1f2a087f717085384a3c6 (diff)
downloadbuilder-b7b8706cf9221a880f79262d98d507f6e64c3d07.tar.xz
bin/get-package-updates: update git hashes in database, too
Diffstat (limited to 'bin')
-rwxr-xr-xbin/get-package-updates9
1 files changed, 9 insertions, 0 deletions
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`'