diff options
author | Erich Eckner <git@eckner.net> | 2018-03-01 14:04:31 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-03-01 14:04:31 +0100 |
commit | 48c7a60e79436c320627740c1cf5a7bc85a8fe96 (patch) | |
tree | faeb0099746f800a15a5382299458929951ff239 /bin | |
parent | 7726164a7bc661bb4c0e5bfa6b81788b375a973b (diff) | |
download | builder-48c7a60e79436c320627740c1cf5a7bc85a8fe96.tar.xz |
bin/bootstrap-mysql: repository_moves new
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/bootstrap-mysql | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/bin/bootstrap-mysql b/bin/bootstrap-mysql index 236b0b7..c828809 100755 --- a/bin/bootstrap-mysql +++ b/bin/bootstrap-mysql @@ -136,7 +136,12 @@ if [ ! "$1" = 'slim' ]; then ' depending_on MEDIUMINT' \ 'repository_stability_relations MEDIUMINT' \ ' more_stable MEDIUMINT :repository_stabilities' \ - ' less_stable MEDIUMINT :repository_stabilities' + ' less_stable MEDIUMINT :repository_stabilities' \ + 'repository_moves MEDIUMINT' \ + ' from_repository MEDIUMINT :repositories' \ + ' to_repository MEDIUMINT :repositories' \ + ' upstream_package_repository SMALLINT :upstream_repositories' \ + ' UNIQUE source from_repository upstream_package_repository' ) # shellcheck disable=SC2016 @@ -488,6 +493,29 @@ fi } | \ sed 's| OR ;|;|' + { + printf 'INSERT IGNORE INTO `repository_moves` (`from_repository`,`to_repository`,`upstream_package_repository`)' + printf ' SELECT `f`.`id`,`t`.`id`,`u`.`id`' + printf ' FROM' + printf ' `repositories` AS `%s` JOIN' \ + 'f' 't' + printf ' `upstream_repositories` AS `u`' + printf ' WHERE ' + printf '(`f`.`name`="%s" AND `t`.`name`="%s" AND `u`.`name`="%s") OR ' \ + 'staging' 'testing' 'core' \ + 'staging' 'testing' 'extra' \ + 'staging' 'testing' 'multilib' \ + 'community-staging' 'community-testing' 'community' \ + 'community-staging' 'community-testing' 'multilib' \ + 'testing' 'core' 'core' \ + 'testing' 'extra' 'extra' \ + 'testing' 'extra' 'multilib' \ + 'community-testing' 'community' 'community' \ + 'community-testing' 'community' 'multilib' + printf ';\n' + } | \ + sed 's| OR ;|;|' + for repo in \ 'core:stable:AQ==' \ 'extra:stable:AQ==' \ |