summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/interpret-mail15
-rwxr-xr-xbin/return-assignment3
-rwxr-xr-xbin/sanity-check18
3 files changed, 22 insertions, 14 deletions
diff --git a/bin/interpret-mail b/bin/interpret-mail
index e515b3c..ef19d4a 100755
--- a/bin/interpret-mail
+++ b/bin/interpret-mail
@@ -20,7 +20,7 @@ if [ $# -ne 0 ]; then
>&2 echo ' Block the given packge for the given reason.'
>&2 echo ''
>&2 echo ' - "stabilize: <package-file>":'
- >&2 echo ' Move the given package from testing to stable.'
+ >&2 echo ' Mark the given package as tested.'
>&2 echo ''
>&2 echo ' - "unblock: <state-file>":'
>&2 echo ' Unblock the given packge.'
@@ -191,11 +191,14 @@ if [ -s "${tmp_dir}/stabilize" ]; then
sed -i '
/\.pkg\.tar\.xz$/!s/$/.pkg.tar.xz/
' "${tmp_dir}/stabilize"
- if run_and_log_on_error "${base_dir}/bin/db-update" -b -f "${tmp_dir}/stabilize"; then
- log 'Successfully stabilized %s packages.\n' "$(wc -l < "${tmp_dir}/stabilize")"
- else
- log 'There was an error while stabilizing the packages - ignoring this message.\n'
- fi
+ find "${work_dir}/package-states" -maxdepth 1 -type f -name '*.testing' \
+ -exec grep -qxF -f "${tmp_dir}/stabilize" '{}' \; \
+ -printf '%p\n' | \
+ tee "${tmp_dir}/stabilized" | \
+ while read -r sf; do
+ mv "${sf}" "${sf%.testing}.tested"
+ done
+ log 'Successfully stabilized %s packages.\n' "$(wc -l < "${tmp_dir}/stabilized")"
fi
if [ -s "${tmp_dir}/unblock" ]; then
diff --git a/bin/return-assignment b/bin/return-assignment
index 888ebbb..c99bc22 100755
--- a/bin/return-assignment
+++ b/bin/return-assignment
@@ -245,9 +245,10 @@ for package in ${packages}; do
done
# remove old state files (these should be only "done" markers, but
-# actually we don't care what it is) - as long as it's not "testing"
+# actually we don't care what it is) - as long as it's not "testing" or "tested"
find "${work_dir}/package-states" -maxdepth 1 -regextype grep \
-not -name '*.testing' \
+ -not -name '*.tested' \
-regex ".*/$(str_to_regex "$1")\(\.[^.]\+\)\{4\}" \
-not -regex ".*/$(str_to_regex "$1.$2.$3.$4")\.[^.]\+" \
-exec rm '{}' \;
diff --git a/bin/sanity-check b/bin/sanity-check
index 2977a90..a892e88 100755
--- a/bin/sanity-check
+++ b/bin/sanity-check
@@ -325,19 +325,23 @@ while [ $# -gt 0 ]; do
state-files)
- for status in 'staging:done' 'testing:testing'; do
+ for status in 'staging' 'testing'; do
[ ${silence} -gt 0 ] || \
- printf 'checking state-files of "%s" ...' "${status%:*}" >> \
+ printf 'checking state-files of "%s" ...' "${status}" >> \
"${tmp_dir}/messages"
errors=$(
(
- find "${work_dir}/package-states" -name "*.${status#*:}" -exec \
- cat {} \; | \
- sed 's|^|package-state-file |'
+ if [ "${status}" = 'staging' ]; then
+ find "${work_dir}/package-states" -name '*.done' \
+ -exec sed 's|^|package-state-file |' '{}' \;
+ else
+ find "${work_dir}/package-states" \( -name '*.testing' -o -name '*.tested' \) \
+ -exec sed 's|^|package-state-file |' '{}' \;
+ fi
ls_master_mirror 'i686' | \
- grep "${status%:*}\$" | \
+ grep "${status}\$" | \
while read -r repo; do
ls_master_mirror "i686/${repo}"
done | \
@@ -352,7 +356,7 @@ while [ $# -gt 0 ]; do
if [ -n "${errors}" ]; then
if [ ${silence} -le 1 ]; then
printf '\nThe following %s packages do not have state files or vice versa:\n%s\n' \
- "${status%:*}" \
+ "${status}" \
"${errors}" >> \
"${tmp_dir}/messages"
fi