Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-05-09 14:35:20 +0200
committerErich Eckner <git@eckner.net>2018-05-09 14:35:20 +0200
commit48cdd01ea9d6a6a74edfc33ef73147b35ce927b5 (patch)
treedf3428d7c629eb7be40c1b94b0f19e9d2779e7bb /lib
parent6c5285a3e9529e1afd04322e320d46a77a9d3cbf (diff)
lib/mysql-functions: update binary_packages_in_repositories in mysql_generate_package_metadata()
Diffstat (limited to 'lib')
-rwxr-xr-xlib/mysql-functions7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/mysql-functions b/lib/mysql-functions
index d192112..cfc8a2e 100755
--- a/lib/mysql-functions
+++ b/lib/mysql-functions
@@ -487,6 +487,13 @@ mysql_generate_package_metadata() {
'repositories' 'name' "${current_repository}" \
'architectures' 'name' "${arch}"
printf ';\n'
+ printf 'COMMIT;\n'
+ printf 'INSERT IGNORE INTO `binary_packages_in_repositories` (`package`,`repository`)'
+ printf ' SELECT LAST_INSERT_ID(),`repositories`.`id`'
+ printf ' FROM `repositories`'
+ printf ' WHERE `repositories`.`name` = from_base64("%s");\n' \
+ "${current_repository}"
+ printf 'COMMIT;\n'
} | \
sed '
s|,)|)|g