summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/return-assignment27
1 files changed, 7 insertions, 20 deletions
diff --git a/bin/return-assignment b/bin/return-assignment
index 6961507..9bb4b0c 100755
--- a/bin/return-assignment
+++ b/bin/return-assignment
@@ -79,23 +79,11 @@ if [ "$5" = 'ERROR' ]; then
find "${work_dir}/package-states/" -maxdepth 1 -name '*.locked' -printf '%f\n' | \
sed 's@^\(.\+\)\.\([0-9a-f]\{40\}\.\)\{2\}[^.]\+\.locked$@\1@'
)
- find "${work_dir}/build-list.loops" -maxdepth 1 \
- -name 'loop_*' \
- -not -name 'loop_*.locked' \
+ find "${work_dir}/build-list.loops" -maxdepth 1 -regextype grep \
+ -regex '.*/loop_[0-9]\+' \
-exec grep -qxF "$1" '{}' \; \
- -print | \
- while read -r loop; do
- if [ -z "$(
- (
- echo "${locked_packages}"
- cat "${loop}"
- ) | \
- sort | \
- uniq -d
- )" ]; then
- rm -f "${loop}.locked"
- fi
- done
+ -not -exec grep -qxF "${locked_packages}" '{}' \; \
+ -exec rm '{}.locked' \;
# move build order to end of build list
@@ -261,11 +249,10 @@ find "${work_dir}/package-states" -maxdepth 1 -regextype grep \
-exec rm '{}' \;
# remove all loops which are broken by this package
-find "${work_dir}/build-list.loops" -maxdepth 1 \
- -name 'loop_*' \
- -not -name 'loop_*.locked' \
+find "${work_dir}/build-list.loops" -maxdepth 1 -regextype grep \
+ -regex '.*/loop_[0-9]\+' \
-exec grep -qxF "$1" '{}' \; \
- -exec rm '{}' '{}.locked' \;
+ -exec rm '{}.locked' \;
# remove package from build list
sed -i "/^$(str_to_regex "$1 $2 $3 $4")\$/d" "${work_dir}/build-list"