Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-02-08 16:36:00 +0100
committerErich Eckner <git@eckner.net>2018-02-08 16:36:00 +0100
commit765f9b249eed27f2b441107de8e2ebcbcbf874b4 (patch)
treea96137759f1053903d30d36acf7f735755c9be94
parent3dd56fb3f3ce073827b0d168859520630dd77894 (diff)
bin/get-package-updates: create metadata for _new_ build list packages
-rwxr-xr-xbin/get-package-updates41
1 files changed, 39 insertions, 2 deletions
diff --git a/bin/get-package-updates b/bin/get-package-updates
index 4fcefd9..a98c9ee 100755
--- a/bin/get-package-updates
+++ b/bin/get-package-updates
@@ -355,11 +355,48 @@ echo 'Extract dependencies of packages.'
mkdir -p "${work_dir}/package-infos"
while read -r package git_revision mod_git_revision repository; do
-
generate_package_metadata "${package}" "${git_revision}" "${mod_git_revision}" "${repository}"
-
done < "${work_dir}/build-list.new"
+{
+ # shellcheck disable=SC2016
+ {
+ printf 'SELECT DISTINCT '
+ printf 'replace(to_base64(`package_sources`.`%s`),"\\n",""),' \
+ 'pkgbase' 'git_revision' 'mod_git_revision'
+ printf 'replace(to_base64(`upstream_repositories`.`name`),"\\n","")'
+ printf ' FROM `binary_packages`'
+ printf ' JOIN `%s` ON `%s`.`id`=`%s`.`%s`' \
+ 'repositories' 'repositories' 'binary_packages' 'repository' \
+ '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'
+ printf ' WHERE `repositories`.`name` in ("build-list","deletion-list")'
+ } | \
+ ${mysql_command} --raw --batch | \
+ sed '
+ 1d
+ ' | \
+ while read -r a b c d; do
+ printf '%s ' \
+ "$(printf '%s' "${a}" | base64 -d)" \
+ "$(printf '%s' "${b}" | base64 -d)" \
+ "$(printf '%s' "${c}" | base64 -d)" \
+ "$(printf '%s' "${d}" | base64 -d)" | \
+ sed 's/ /\n/'
+ done | \
+ sed '
+ y/\t/ /
+ p
+ '
+ cat "${work_dir}/build-list.new"
+} | \
+ sort | \
+ uniq -u | \
+ while read -r package git_revision mod_git_revision repository; do
+ mysql_generate_package_metadata "${package}" "${git_revision}" "${mod_git_revision}" "${repository}"
+ done
+
echo 'apply blacklisting'
# ignore blacklisted packages and dependent packages
# this is the first time when all the information is available and up to date