From d7e35686716933cbfaac6b900d7d2568063b7e9f Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 7 Feb 2018 16:00:33 +0100 Subject: bin/build-master-status-from-mysql: include build-dependencies --- bin/build-master-status-from-mysql | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'bin/build-master-status-from-mysql') 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,^-.*$,\0, -- cgit v1.2.3-70-g09d2