From ae42f3e6bb28bce7fb6b583066c36312b827b29d Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 8 Jun 2017 09:52:25 +0200 Subject: bin/get-package-updates: remove non-packages from loop files --- bin/get-package-updates | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'bin/get-package-updates') diff --git a/bin/get-package-updates b/bin/get-package-updates index 7a565d2..003020a 100755 --- a/bin/get-package-updates +++ b/bin/get-package-updates @@ -330,6 +330,22 @@ if [ -s "${work_dir}/tsort.error" ]; then print $2 >"'"${work_dir}"'/build-list.loops.new/loop_" n } ' "${work_dir}/tsort.error" + + # remove lines from loop files which are no packages + ls "${work_dir}/build-list.loops.new" | \ + grep '^loop_[0-9]\+$' | \ + while read -r loop; do + ( + sort -u "${work_dir}/build-list.loops.new/${loop}" + cut -d' ' -f1 "${work_dir}/build-list.new.new" | \ + sort -u + ) | \ + sort | \ + uniq -d > \ + "${work_dir}/build-list.loops.new/${loop}.new" + mv "${work_dir}/build-list.loops.new/${loop}"{.new,} + done + else rm "${work_dir}/tsort.error" fi -- cgit v1.2.3-70-g09d2