summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-02-05 13:04:15 +0100
committerErich Eckner <git@eckner.net>2018-02-05 13:04:15 +0100
commit13d43b1f065af8c0a260b486e7b2fa9491e1ff33 (patch)
tree34a0f50d1b06cb5ede090d141a2ecc8bf658fe1c /bin
parent4a0fb5fa26056b7551f812f1e39d5e00a0c69c6e (diff)
downloadbuilder-13d43b1f065af8c0a260b486e7b2fa9491e1ff33.tar.xz
bin/seed-build-list: also take known-packages from the database
Diffstat (limited to 'bin')
-rwxr-xr-xbin/seed-build-list43
1 files changed, 23 insertions, 20 deletions
diff --git a/bin/seed-build-list b/bin/seed-build-list
index 9a0123e..e17242c 100755
--- a/bin/seed-build-list
+++ b/bin/seed-build-list
@@ -133,28 +133,31 @@ mod_repo_rev=$(cat "${work_dir}/archlinux32.revision")
generate_package_metadata "${pkg}" "${repo_rev}" "${mod_repo_rev}" "${prepo}"
done
-# shellcheck disable=SC2016
{
- printf 'SELECT '
- printf '`package_sources`.`%s`,' \
- 'pkgbase' 'git_revision' 'mod_git_revision'
- printf '`upstream_repositories`.`name`,`binary_packages`.`pkgname`'
- printf ' FROM `binary_packages`'
- printf ' JOIN `%s` ON `%s`.`id`=`%s`.`%s`' \
- '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'
+ # shellcheck disable=SC2016
+ {
+ printf 'SELECT '
+ printf '`package_sources`.`%s`,' \
+ 'pkgbase' 'git_revision' 'mod_git_revision'
+ printf '`upstream_repositories`.`name`,`binary_packages`.`pkgname`'
+ printf ' FROM `binary_packages`'
+ printf ' JOIN `%s` ON `%s`.`id`=`%s`.`%s`' \
+ '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/ /
+ '
+ find "${work_dir}/package-infos" -maxdepth 1 -name '*.packages' -exec grep -HF '' "{}" \; | \
+ sed '
+ s|^.*/||
+ s|\.\([^.]\+\)\.\([^.]\+\)\.\([^.]\+\)\.[^.]\+:| \1 \2 \3 |
+ '
} | \
- ${mysql_command} --raw --batch | \
- sed '
- 1d
- y/\t/ /
- ' > /dev/null # not yet working (the query works, but the entries are missing)
-find "${work_dir}/package-infos" -maxdepth 1 -name '*.packages' -exec grep -HF '' "{}" \; | \
- sed '
- s|^.*/||
- s|\.\([^.]\+\)\.\([^.]\+\)\.\([^.]\+\)\.[^.]\+:| \1 \2 \3 |
- ' | \
+ sort -u | \
sort -k5,5 > \
"${tmp_dir}/known-packages"