Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/db-update37
1 files changed, 35 insertions, 2 deletions
diff --git a/bin/db-update b/bin/db-update
index 34573bc..7e95460 100755
--- a/bin/db-update
+++ b/bin/db-update
@@ -61,6 +61,14 @@ done
packages_to_stabilize=("${@}")
+for package in "${packages_to_stabilize[@]}"; do
+ # some sanity checks
+ if [ ! -f "${work_dir}/package-states/${package}.testing" ]; then
+ >&2 echo "Package '${package}' is not in testing!"
+ exit 2
+ fi
+done
+
updated_package_database=false
# Create a lock file and a trap.
@@ -223,8 +231,33 @@ for package in ${done_packages}; do
mv "${work_dir}/package-states/${package}."{done,testing}
done
-# TODO:
-# move packages from packages_to_stabilize from *testing/ to the stable repos
+# move packages in packages_to_stabilize from *testing/ to the stable repos
+for package in "${packages_to_stabilize[@]}"; do
+ parts=($(cat "${work_dir}/package-states/${package}.testing"))
+ parts_names=(
+ $(
+ printf '%s\n' "${parts[@]}" | \
+ sed 's|\(-[^-]\+\)\{3\}\.pkg\.tar\.xz$||'
+ )
+ )
+ source="$(official_or_community ${package})testing"
+ destination="${package##*.}"
+ pushd "${master_mirror_directory}/i686/${source}" > /dev/null
+ repo-remove "${source}.db.tar.gz" "${parts_names[@]}"
+ for part in "${parts[@]}"; do
+ mv "${part}"{,.sig} "../${destination}/"
+ updated_package_database=true
+ done
+ popd > /dev/null
+ pushd "${master_mirror_directory}/i686/${destination}" > /dev/null
+ repo-add "${destination}.db.tar.gz" "${parts[@]}"
+ for part in "${parts[@]}"; do
+ remove_old_package_versions "${part}"
+ done
+ popd > /dev/null
+
+ rm "${work_dir}/package-states/${package}.testing"
+done
if ${updated_package_database}; then
date '+%s' > \