summaryrefslogtreecommitdiff
path: root/bin/get-package-updates
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-05-17 14:58:18 +0200
committerErich Eckner <git@eckner.net>2017-05-17 14:58:18 +0200
commitab49fa11c4b119da5ab5ea9d82d88ffe5764ea52 (patch)
treedf8fcaa0342d7bbda84f6be729bdc4960536be64 /bin/get-package-updates
parentcd2540e6a7bcae913be1034d93c7dd2b9a9a704a (diff)
downloadbuilder-ab49fa11c4b119da5ab5ea9d82d88ffe5764ea52.tar.xz
bin/get-package-updates: buffer old loop directory upon creation of new one
Diffstat (limited to 'bin/get-package-updates')
-rwxr-xr-xbin/get-package-updates7
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/get-package-updates b/bin/get-package-updates
index 80e9527..29fa1ec 100755
--- a/bin/get-package-updates
+++ b/bin/get-package-updates
@@ -212,7 +212,7 @@ echo 'Now actually sort it.'
awk '{print $5 " " $7 " " $8 " " $9}' > \
"${work_dir}/build-list.new.new"
-rm -f "${work_dir}/build-order.loops/*"
+mkdir "${work_dir}/build-order.loops.new"
if [ -s "${work_dir}/tsort.error" ]; then
>&2 echo 'WARNING: There is a dependency cycle!'
@@ -226,7 +226,7 @@ if [ -s "${work_dir}/tsort.error" ]; then
getline
}
{
- print $2 >"'"${work_dir}"'/build-list.loops/loop_" n
+ print $2 >"'"${work_dir}"'/build-list.loops.new/loop_" n
}
' "${work_dir}/tsort.error"
else
@@ -235,8 +235,9 @@ fi
# Move the .new-files to the actual files
+rm -rf --one-file-system "${work_dir}/build-order.loops"
(
- echo "build-list.new" "build-list" "deletion-list"
+ echo "build-order.loops" "build-list.new" "build-list" "deletion-list"
echo "${!repo_paths[@]}" | \
sed 's@\( \|$\)@.revision\1@g'
) | \