Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/bootstrap-mysql
diff options
context:
space:
mode:
Diffstat (limited to 'bin/bootstrap-mysql')
-rwxr-xr-xbin/bootstrap-mysql29
1 files changed, 28 insertions, 1 deletions
diff --git a/bin/bootstrap-mysql b/bin/bootstrap-mysql
index 1a50496..c965319 100755
--- a/bin/bootstrap-mysql
+++ b/bin/bootstrap-mysql
@@ -133,7 +133,10 @@ if [ ! "$1" = 'slim' ]; then
' description VARCHAR(512)'
'todo_links MEDIUMINT' \
' dependent MEDIUMINT' \
- ' depending_on MEDIUMINT'
+ ' depending_on MEDIUMINT' \
+ 'repository_stability_relations MEDIUMINT' \
+ ' more_stable MEDIUMINT :repository_stabilities' \
+ ' less_stable MEDIUMINT :repository_stabilities'
)
{
@@ -396,6 +399,30 @@ fi
} | \
sed 's|,;|;|'
+ # shellcheck disable=SC2016
+ {
+ printf 'INSERT IGNORE INTO `repository_stability_relations` (`more_stable`,`less_stable`)'
+ printf ' SELECT `ms`.`id`,`ls`.`id`'
+ printf ' FROM `repository_stabilities` AS `ms` JOIN `repository_stabilities` AS `ls`'
+ printf ' WHERE '
+ printf '(`ms`.`name`="%s" AND `ls`.`name`="%s") OR ' \
+ 'stable' 'stable' \
+ 'stable' 'testing' \
+ 'stable' 'staging' \
+ 'stable' 'unbuilt' \
+ 'stable' 'forbidden' \
+ 'testing' 'testing' \
+ 'testing' 'staging' \
+ 'testing' 'unbuilt' \
+ 'testing' 'forbidden' \
+ 'staging' 'staging' \
+ 'staging' 'unbuilt' \
+ 'staging' 'forbidden' \
+ 'unbuilt' 'forbidden'
+ printf ';\n'
+ } | \
+ sed 's| OR ;|;|'
+
for repo in \
'core:stable:AQ==' \
'extra:stable:AQ==' \