diff --git a/mtps-pkg-test b/mtps-pkg-test index 4ea0b94..f65752c 100755 --- a/mtps-pkg-test +++ b/mtps-pkg-test @@ -36,6 +36,7 @@ : "${PROG:=${0##*/}}" EXIT_CODE_SKIP=7 +EXIT_CODE_WARN=8 # Source `mtps-setup' from $PATH if command -v "mtps-setup" >/dev/null; then source "mtps-setup"; fi @@ -121,7 +122,7 @@ run_with_scriptlet_check() { local ret=${PIPESTATUS[0]} cmd_output_parts_prefix="cmd-output-part" if [ "$ret" -eq 0 ]; then - # The script is running with globbing off, but it's useful here, so let's enabled it temporarily + # The script is running with globbing off, but it's useful here, so let's enable it temporarily set +f rm -f "$cmd_output_parts_prefix"* # Split the output into separate files on the lines containing the "Running scriptlet: " string @@ -153,8 +154,8 @@ run_with_scriptlet_check() { # Note: we ignore cases where there is a leading or trailing dash (-), # the reason is that the keyword ("error" for example) can appear in package names. # See how the regexp works (and play with it!): https://regex101.com/r/Yws0tT/1 - grep -P -i -q '(?/dev/null; then source "mtps-setup"; fi @@ -209,6 +210,8 @@ for nevra in $nevras_in_repo; do #yum -y history rollback "$START" || echo "Ignoring rollback error: RHBZ#1614346" if [ "$test_status" -eq $EXIT_CODE_SKIP ]; then new_logfname="$(dirname "$logfname")/SKIP-$(basename "$logfname")" + elif [ "$test_status" -eq $EXIT_CODE_WARN ]; then + new_logfname="$(dirname "$logfname")/WARN-$(basename "$logfname")" elif [ "$test_status" -ne 0 ]; then ret=1 if [ -n "$CRITICAL" ]; then