Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/build-master-status-from-mysql
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-02-07 16:00:33 +0100
committerErich Eckner <git@eckner.net>2018-02-07 16:00:33 +0100
commitd7e35686716933cbfaac6b900d7d2568063b7e9f (patch)
treec9231700d60338eeab6694ce8b6529d2cc45ecee /bin/build-master-status-from-mysql
parenteebf4ff1ff5f243645999857e021d7749c45090d (diff)
bin/build-master-status-from-mysql: include build-dependencies
Diffstat (limited to 'bin/build-master-status-from-mysql')
-rwxr-xr-xbin/build-master-status-from-mysql39
1 files changed, 39 insertions, 0 deletions
diff --git a/bin/build-master-status-from-mysql b/bin/build-master-status-from-mysql
index 7a3d7e6..3cacfa1 100755
--- a/bin/build-master-status-from-mysql
+++ b/bin/build-master-status-from-mysql
@@ -151,6 +151,41 @@ find "${work_dir}/package-states" -mindepth 1 -maxdepth 1 \
sort -u > \
"${tmp_dir}/testing.file"
+# shellcheck disable=SC2016
+{
+ printf 'SELECT '
+ printf '`package_sources`.`%s`,' \
+ 'pkgbase' \
+ 'git_revision' \
+ 'mod_git_revision'
+ printf '`upstream_repositories`.`name`,`install_targets`.`name`'
+ printf ' FROM `binary_packages`'
+ printf ' JOIN `%s` ON `%s`.`id`=`%s`.`%s`' \
+ 'dependencies' 'binary_packages' 'dependencies' 'dependent' \
+ 'dependency_types' 'dependency_types' 'dependencies' 'dependency_type'
+ printf ' AND `dependency_types`.`relevant_for_building`'
+ printf ' JOIN `%s` ON `%s`.`id`=`%s`.`%s`' \
+ 'install_targets' 'install_targets' 'dependencies' 'depending_on' \
+ 'build_assignments' 'build_assignments' 'binary_packages' 'build_assignment' \
+ 'package_sources' 'package_sources' 'build_assignments' 'package_source' \
+ 'upstream_repositories' 'upstream_repositories' 'package_sources' 'upstream_package_repository'
+} | \
+ ${mysql_command} --raw --batch | \
+ sed '
+ 1d
+ y/\t/ /
+ ' | \
+ sort -u > \
+ "${tmp_dir}/build-dependencies.mysql"
+find "${work_dir}/package-infos" -name '*.build-depends' \
+ -exec grep -HF '' {} \; | \
+ sed '
+ s,^.*/,,
+ s/\.\([^.]\+\)\.\([^.]\+\)\.\([^.:]\+\)\.build-depends:\([^:]\+\)$/ \1 \2 \3 \4/
+ ' | \
+ sort -u > \
+ "${tmp_dir}/build-dependencies.file"
+
{
mysql_sanity_check || true
diff -u \
@@ -173,6 +208,10 @@ find "${work_dir}/package-states" -mindepth 1 -maxdepth 1 \
"${tmp_dir}/testing.file" \
"${tmp_dir}/testing.mysql" || \
true
+ diff -u \
+ "${tmp_dir}/build-dependencies.file" \
+ "${tmp_dir}/build-dependencies.mysql" || \
+ true
} | \
sed '
s,^-.*$,<font color="#FF0000">\0</font>,