Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/get-package-updates
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-03-22 15:45:47 +0100
committerErich Eckner <git@eckner.net>2018-03-22 15:45:47 +0100
commitba6f43ca62a719d075cd23ccba35dbbab5f43951 (patch)
tree21ff5f78092909dac12e0b36bb5599852d2ae47e /bin/get-package-updates
parentb3023cfe9c2d4e8319885e22a575bd1a522b3f6c (diff)
decommission deletion-list
Diffstat (limited to 'bin/get-package-updates')
-rwxr-xr-xbin/get-package-updates35
1 files changed, 4 insertions, 31 deletions
diff --git a/bin/get-package-updates b/bin/get-package-updates
index dcc9f3b..f4c53b4 100755
--- a/bin/get-package-updates
+++ b/bin/get-package-updates
@@ -99,17 +99,6 @@ fi
# delete_package package
# mark $package for deletion
delete_package() {
- # shellcheck disable=SC2016
- {
- printf 'SELECT DISTINCT `package_sources`.`pkgbase`'
- printf ' FROM `package_sources`'
- mysql_join_package_sources_build_assignments
- mysql_join_build_assignments_binary_packages
- printf ' WHERE `package_sources`.`pkgbase`=from_base64("%s")' \
- "$(printf '%s' "$1" | base64 -w0)"
- } | \
- mysql_run_query >> \
- "${work_dir}/deletion-list.new"
# TODO: Once we want to rely on the database for test_exclusion, we
# need to run the command below unconditionally, but with some
# changes, so we can easily revert.
@@ -200,10 +189,6 @@ echo 'Check modified packages from the last update, and put them to the build li
# If a package is deleted, remove from the rebuild list, and add it to the deletion list.
# If a new package is added, then ensure that it's not on the deletion list.
-cp \
- "${work_dir}/deletion-list" \
- "${work_dir}/deletion-list.new"
-
for repo in ${repo_names}; do
eval repo_path='"${repo_paths__'"${repo}"'}"'
eval old_repo_revision='"${old_repo_revisions__'"${repo}"'}"'
@@ -291,7 +276,6 @@ done | \
fi
fi
if [ "${mode}" = 'A' ] || [ "${mode}" = 'M' ]; then
- sed -i "/^$(str_to_regex "${package}")\$/d" "${work_dir}/deletion-list.new"
# shellcheck disable=SC2016
{
# delete old build assignment and associated binary packages
@@ -329,9 +313,6 @@ done | \
exit 1
done
-sort -u "${work_dir}/deletion-list.new" | \
- sponge "${work_dir}/deletion-list.new"
-
echo 'apply blacklisting'
# ignore blacklisted packages and dependent packages
# this is the first time when all the information is available and up to date
@@ -462,15 +443,10 @@ echo "${black_listed}" | \
delete_package "${package}"
done
-sort -u "${work_dir}/deletion-list.new" | \
- sponge "${work_dir}/deletion-list.new"
-
if [ -n "${test_exclusion}" ]; then
- # we should not actually update the build-list et. al, but solely print this difference:
- if diff --color -u "${work_dir}/deletion-list" "${work_dir}/deletion-list.new"; then
- printf 'If you put "%s" on the blacklist, no additional packages will end up on the deletion list.\n' "${test_exclusion}"
- fi
+ # TODO: reimplement test_exclusion with information from the database
+ >&2 echo 'sry, not yet done.'
exit 0
fi
@@ -504,11 +480,8 @@ mysql_find_build_assignment_loops
# Move the .new-files to the actual files
-{
- printf '%s\n' "deletion-list"
- # shellcheck disable=SC2086
- printf '%s.revision\n' ${repo_names}
-} | \
+# shellcheck disable=SC2086
+printf '%s.revision\n' ${repo_names} | \
while read -r file; do
mv "${work_dir}/${file}.new" "${work_dir}/${file}"
done