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>2017-06-08 09:52:25 +0200
committerErich Eckner <git@eckner.net>2017-06-08 09:52:25 +0200
commitae42f3e6bb28bce7fb6b583066c36312b827b29d (patch)
treee9bb8979605b54dfab26bd846c63b3a116262aac
parent6a98dad57677f20a491d0dc4a09a88ed853959dd (diff)
bin/get-package-updates: remove non-packages from loop files
-rwxr-xr-xbin/get-package-updates16
1 files changed, 16 insertions, 0 deletions
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