summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-05-05 12:42:53 +0200
committerErich Eckner <git@eckner.net>2017-05-05 12:42:53 +0200
commit8c66f32a02cfe7e8c9552282286c18b531b765b9 (patch)
tree524590a2b5f9e0837eb5ba23b8d247937cff5346 /bin
parentbfbef03c657cd15230bf36d283fb18f899fbd67f (diff)
downloadbuilder-8c66f32a02cfe7e8c9552282286c18b531b765b9.tar.xz
bin/get-assignment: adopt to new build-list format
Diffstat (limited to 'bin')
-rwxr-xr-xbin/get-assignment20
1 files changed, 9 insertions, 11 deletions
diff --git a/bin/get-assignment b/bin/get-assignment
index ab33737..1161444 100755
--- a/bin/get-assignment
+++ b/bin/get-assignment
@@ -24,17 +24,17 @@ mkdir -p "${work_dir}/package-states"
hand_out_assignment() {
# locked packages won't be handed out
- if [ -f "${work_dir}/package-states/$1.$2.$3.locked" ]; then
+ if [ -f "${work_dir}/package-states/$1.$2.$3.$4.locked" ]; then
return 0
fi
- echo "$1 $2 $3"
- echo "${SSH_CLIENT%% *}" > "${work_dir}/package-states/$1.$2.$3.locked"
+ echo "$1 $2 $3 $4"
+ echo "${SSH_CLIENT%% *}" > "${work_dir}/package-states/$1.$2.$3.$4.locked"
# lock every loop this package breaks
grep "^${1//./\\.}\$" "${work_dir}/build-list.loops/"loop_* | \
cut -d: -f1 | \
- tee -a "${work_dir}/package-states/$1.$2.$3.locked" | \
+ tee -a "${work_dir}/package-states/$1.$2.$3.$4.locked" | \
sed 's|$|.locked|' | \
xargs -rn1 touch
@@ -57,11 +57,11 @@ fi
num_jobs=0
pending_packages=false
-while read -r package git_revision repository; do
+while read -r package git_revision mod_git_revision repository; do
- if [ -f "${work_dir}/package-states/${package}.${git_revision}.${repository}.locked" ];
+ if [ -f "${work_dir}/package-states/${package}.${git_revision}.${mod_git_revision}.${repository}.locked" ];
then
- if [ "${SSH_CLIENT%% *}" = "$(head -n1 "${work_dir}/package-states/${package}.${git_revision}.${repository}.locked")" ]; then
+ if [ "${SSH_CLIENT%% *}" = "$(head -n1 "${work_dir}/package-states/${package}.${git_revision}.${mod_git_revision}.${repository}.locked")" ]; then
num_jobs=$[${num_jobs}+1];
fi
else
@@ -84,7 +84,7 @@ fi
# Find first package of build-list whose dependencies are all met
-while read -r package git_revision repository; do
+while read -r package git_revision mod_git_revision repository; do
[ -z "$(
(
@@ -95,7 +95,7 @@ while read -r package git_revision repository; do
uniq -d
)" ] || continue
- hand_out_assignment "${package}" "${git_revision}" "${repository}"
+ hand_out_assignment "${package}" "${git_revision}" "${mod_git_revision}" "${repository}"
done < "${work_dir}/build-list"
@@ -118,8 +118,6 @@ for package in $(
if assignment="$(grep "^${package} " "${work_dir}/build-list")"; then
hand_out_assignment ${assignment}
- else
- echo "'${package}' ..."
fi
done