Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package retry for openSUSE:Factory checked 
in at 2024-08-14 14:16:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/retry (Old)
 and      /work/SRC/openSUSE:Factory/.retry.new.7232 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "retry"

Wed Aug 14 14:16:22 2024 rev:8 rq:1193852 version:1723625520.fd868ce

Changes:
--------
--- /work/SRC/openSUSE:Factory/retry/retry.changes      2024-04-05 
20:28:01.767030826 +0200
+++ /work/SRC/openSUSE:Factory/.retry.new.7232/retry.changes    2024-08-14 
14:17:02.758044638 +0200
@@ -1,0 +2,6 @@
+Wed Aug 14 08:53:47 UTC 2024 - [email protected]
+
+- Update to version 1723625520.fd868ce:
+  * Add an option for infinite retries
+
+-------------------------------------------------------------------

Old:
----
  retry-1712304225.2d4e170.obscpio

New:
----
  retry-1723625520.fd868ce.obscpio

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ retry.spec ++++++
--- /var/tmp/diff_new_pack.Zp7KBg/_old  2024-08-14 14:17:03.422072397 +0200
+++ /var/tmp/diff_new_pack.Zp7KBg/_new  2024-08-14 14:17:03.422072397 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           retry
-Version:        1712304225.2d4e170
+Version:        1723625520.fd868ce
 Release:        0
 Summary:        A simple tool for retrying command executions in plain POSIX sh
 License:        MIT

++++++ retry-1712304225.2d4e170.obscpio -> retry-1723625520.fd868ce.obscpio 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/retry-1712304225.2d4e170/retry 
new/retry-1723625520.fd868ce/retry
--- old/retry-1712304225.2d4e170/retry  2024-04-05 10:03:45.000000000 +0200
+++ new/retry-1723625520.fd868ce/retry  2024-08-14 10:52:00.000000000 +0200
@@ -5,7 +5,8 @@
 options:
     -h,--help                   Show this help
     -r,--retries=RETRIES        How many retries to do on command failure after
-                                the initial try. Defaults to 3.
+                                the initial try. Set -1 for infinite retries.
+                                Defaults to 3.
     -s,--sleep=SLEEP            How many seconds to sleep between retries.
                                 Defaults to 3 seconds.
     -e,--exponential[=FACTOR]   Enable simple exponential back-off algorithm.
@@ -38,13 +39,18 @@
 sleep="${sleep:-3}"
 
 ret=0
+retries_msg=""
 while true; do
     ret=0
     "$@" && exit
     ret=$?
-    [ "$retries" -gt 0 ] || break
-    echo "Retrying up to $retries more times after sleeping ${sleep}s …" >&2
-    retries=$((retries-1))
+    if [ "$retries" = 0 ]; then
+        break
+    elif [ "$retries" != -1 ]; then
+        retries_msg="up to $retries more times "
+        retries=$((retries-1))
+    fi
+    echo "Retrying ${retries_msg}after sleeping ${sleep}s …" >&2
     sleep "$sleep"
     [ -n "$exponential" ] && sleep=$((sleep*exponential))
 done
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/retry-1712304225.2d4e170/test/01-retry.t 
new/retry-1723625520.fd868ce/test/01-retry.t
--- old/retry-1712304225.2d4e170/test/01-retry.t        2024-04-05 
10:03:45.000000000 +0200
+++ new/retry-1723625520.fd868ce/test/01-retry.t        2024-08-14 
10:52:00.000000000 +0200
@@ -13,7 +13,7 @@
 
 source bash+ :std
 use Test::More
-plan tests 15
+plan tests 18
 
 PATH=$dir/..:$PATH
 
@@ -42,4 +42,8 @@
 is $rc 0 'passing command without retry returns no error'
 trap "rm -f 'run_count.txt'" EXIT
 set +e; out=$(retry -r 2 -s 0 $dir/success_on_third.sh 2>&1); rc=$?; set -e
+like "$out" 'Retrying up to 2 more' 'number of retries printed'
 is $rc 0 'pass on last run is success'
+set +e; out=$(retry -r-1 -s 0 $dir/success_on_third.sh 2>&1); rc=$?; set -e
+like "$out" 'Retrying after sleeping' 'infinite retries without number of 
retries'
+is $rc 0 'pass on last run with infinite retries is success'

++++++ retry.obsinfo ++++++
--- /var/tmp/diff_new_pack.Zp7KBg/_old  2024-08-14 14:17:03.554077915 +0200
+++ /var/tmp/diff_new_pack.Zp7KBg/_new  2024-08-14 14:17:03.558078082 +0200
@@ -1,5 +1,5 @@
 name: retry
-version: 1712304225.2d4e170
-mtime: 1712304225
-commit: 2d4e17034aba7d2ad0aa9975757ee2df2ad5bdfe
+version: 1723625520.fd868ce
+mtime: 1723625520
+commit: fd868cee95061c8473fae6139e5b6e004f0692a8
 

Reply via email to