Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/mysql-functions
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-02-12 13:46:07 +0100
committerErich Eckner <git@eckner.net>2018-02-12 13:46:07 +0100
commit1bee9d0041a1772d1066481d49bb349fa4adc28d (patch)
tree63332ee9ea86a45d0db0a8f53086ab2c0ae54d57 /bin/mysql-functions
parente2f5e61ff6a66bbf49af4d6f07f87eae6b4c3474 (diff)
bin/mysql-functions: add check if a single build assignment having packages on the build-list, deletion-list or to-beconsidered also has packages in a second "repository"
Diffstat (limited to 'bin/mysql-functions')
-rwxr-xr-xbin/mysql-functions18
1 files changed, 17 insertions, 1 deletions
diff --git a/bin/mysql-functions b/bin/mysql-functions
index 262112e..ca78846 100755
--- a/bin/mysql-functions
+++ b/bin/mysql-functions
@@ -644,9 +644,25 @@ mysql_sanity_check() {
printf ' JOIN `repositories` AS `arep` ON `a`.`repository`=`arep`.`id`'
printf ' JOIN `repositories` AS `brep` ON `b`.`repository`=`brep`.`id`'
printf ' WHERE `a`.`sub_pkgrel`!=`b`.`sub_pkgrel`'
- printf ' AND `%srep`.`name` = "build-list"' \
+ printf ' AND `%srep`.`name`="build-list"' \
'a' 'b'
printf ';\n'
+ printf 'SELECT DISTINCT CONCAT("package source ",'
+ printf '`package_sources`.`%s`,".",' \
+ 'pkgbase' 'git_revision' 'mod_git_revision'
+ printf '`upstream_repositories`.`name`," has parts in ",'
+ printf '`repo_a`.`name`," and ",'
+ printf '`repo_b`.`name`," - which should not be the case!")'
+ printf ' FROM `upstream_repositories`'
+ printf ' JOIN `%s` ON `%s`.`%s`=`%s`.`id`' \
+ 'package_sources' 'package_sources' 'upstream_package_repository' 'upstream_repositories' \
+ 'build_assignments' 'build_assignments' 'package_source' 'package_sources' \
+ 'binary_packages` AS `bin_a' 'bin_a' 'build_assignment' 'build_assignments' \
+ 'binary_packages` AS `bin_b' 'bin_b' 'build_assignment' 'build_assignments' \
+ 'repositories` AS `repo_a' 'bin_a' 'repository' 'repo_a' \
+ 'repositories` AS `repo_b' 'bin_b' 'repository' 'repo_b'
+ printf ' WHERE `repo_a`.`name` IN ("build-list","deletion-list","to-be-decided")'
+ printf ' AND `bin_a`.`repository`!=`bin_b`.`repository`;\n'
} | \
${mysql_command} --raw --batch | \
sed '