diff options
author | Erich Eckner <git@eckner.net> | 2017-06-08 09:52:25 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2017-06-08 09:52:25 +0200 |
commit | ae42f3e6bb28bce7fb6b583066c36312b827b29d (patch) | |
tree | e9bb8979605b54dfab26bd846c63b3a116262aac /bin | |
parent | 6a98dad57677f20a491d0dc4a09a88ed853959dd (diff) | |
download | builder-ae42f3e6bb28bce7fb6b583066c36312b827b29d.tar.xz |
bin/get-package-updates: remove non-packages from loop files
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/get-package-updates | 16 |
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 |