Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/db-update33
1 files changed, 31 insertions, 2 deletions
diff --git a/bin/db-update b/bin/db-update
index 7c60df7..48e0eb0 100755
--- a/bin/db-update
+++ b/bin/db-update
@@ -381,6 +381,37 @@ if [ -s "${work_dir}/build-master-sanity" ]; then
exit 1
fi
+tmp_dir=$(mktemp -d "${work_dir}/tmp.XXXXXX")
+trap 'rm -rf --one-file-system "${tmp_dir}"' EXIT
+
+packages_to_stabilize=$(
+ (
+ printf '%s\n' ${packages_to_stabilize} | \
+ sort -u | \
+ sed '
+ /\.pkg\.tar\.xz$/{
+ w '"${tmp_dir}/packages-to-stabilize"'
+ d
+ }
+ ' > /dev/null
+ ls "${work_dir}/package-states" | \
+ sed -n '
+ /\.testing$/{
+ s|^|'"${work_dir}"'/package-states/|
+ p
+ }
+ ' | \
+ xargs -r grep -HF '' | \
+ sed '
+ s|^.*/||
+ s|^\([^:]\+\)\.testing:|\1 |
+ ' | \
+ sort -k2,2 | \
+ join -1 2 -2 1 -o 1.1 - "${tmp_dir}/packages-to-stabilize"
+ ) | \
+ sort -u
+)
+
for package in ${packages_to_stabilize}; do
# some sanity checks
if [ ! -f "${work_dir}/package-states/${package}.testing" ]; then
@@ -403,8 +434,6 @@ if ! flock ${block_flag} 8; then
exit 1
fi
-tmp_dir=$(mktemp -d "${work_dir}/tmp.XXXXXX")
-
clean_up_lock_file() {
rm -f "${package_database_lock_file}" "${build_list_lock_file}"
rm -rf --one-file-system "${tmp_dir}"