index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
-rwxr-xr-x | bin/common-functions | 4 | ||||
-rwxr-xr-x | bin/db-update | 9 | ||||
-rwxr-xr-x | bin/return-assignment | 4 | ||||
-rwxr-xr-x | bin/why_dont_you | 4 |
diff --git a/bin/common-functions b/bin/common-functions index b2819b2..2d15f5e 100755 --- a/bin/common-functions +++ b/bin/common-functions @@ -221,7 +221,7 @@ delete_old_metadata() { local current_metadata current_metadata=$( - ls "${work_dir}/package-infos" | \ + find "${work_dir}/package-infos" -maxdepth 1 -printf '%f\n' | \ sed ' s|\.[^.]\+$|| s|\.\([^.]\+\)\.\([^.]\+\)\.\([^.]\+\)$| \1 \2 \3| @@ -234,7 +234,7 @@ delete_old_metadata() { echo "${current_metadata}" # package-states should stay - ls -1 "${work_dir}/package-states" | \ + find "${work_dir}/package-states" -maxdepth 1 -printf '%f\n' | \ sed ' s|\.\([^.]\+\)\.\([^.]\+\)\(\.[^.]\+\)\.\([^.]\+\)$| \1 \2 \3| ' | \ diff --git a/bin/db-update b/bin/db-update index d05f69f..74bab79 100755 --- a/bin/db-update +++ b/bin/db-update @@ -507,12 +507,9 @@ done # packages which are done -ls "${work_dir}/package-states" | \ - sed -n ' - /\.done$/{ - s|^\(.*\)\(\(\.[^.]\+\)\{3\}\)\.done$|\1 \1\2| - p - } +find "${work_dir}/package-states" -maxdepth 1 -type f -name '*.done' -printf '%f\n' | \ + sed ' + s|^\(.*\)\(\(\.[^.]\+\)\{3\}\)\.done$|\1 \1\2| ' | \ sort > \ "${tmp_dir}/done-packages" diff --git a/bin/return-assignment b/bin/return-assignment index ddea81b..8f11923 100755 --- a/bin/return-assignment +++ b/bin/return-assignment @@ -65,8 +65,8 @@ if [ "$5" = 'ERROR' ]; then # unlock every loop this package would have broken and which is not # broken by another locked package locked_packages=$( - find "${work_dir}/package-states/" -maxdepth 1 -name '*.locked' | \ - sed 's@^.*/\([^/]\+\)\.\([0-9a-f]\{40\}\.\)\{2\}[^.]\+\.locked$@\1@' + find "${work_dir}/package-states/" -maxdepth 1 -name '*.locked' -printf '%f\n' | \ + sed 's@^\(.\+\)\.\([0-9a-f]\{40\}\.\)\{2\}[^.]\+\.locked$@\1@' ) grep -lxF "${1}" "${work_dir}/build-list.loops/loop_"* 2> /dev/null | \ while read -r loop; do diff --git a/bin/why_dont_you b/bin/why_dont_you index a03f50f..593ad1b 100755 --- a/bin/why_dont_you +++ b/bin/why_dont_you @@ -60,8 +60,8 @@ case "${action}" in for pkg in "$@"; do - if ! find "${work_dir}/package-states" -maxdepth 1 -printf '%f\n' | \ - grep -q "^$(str_to_regex "${pkg}")\(\.[^.]\+\)\{3\}\.done\$"; then + if ! find "${work_dir}/package-states" -maxdepth 1 | \ + grep -q "/$(str_to_regex "${pkg}")\(\.[^.]\+\)\{3\}\.done\$"; then printf '"%s" is not in staging!\n' "${pkg}" continue fi |