commit:     2eef717c4b630f359235f2801fafdc9e63c546fb
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat May 20 08:17:38 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri May 26 01:33:03 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=2eef717c

emerge-webrsync: handle early hours correctly

One of the perils of only doing development late...

We would error out on '08' etc as the hour. Strip the 0.

Bug: https://bugs.gentoo.org/905868
Signed-off-by: Sam James <sam <AT> gentoo.org>

 bin/emerge-webrsync | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync
index 7fed4e790..a84f68aa1 100755
--- a/bin/emerge-webrsync
+++ b/bin/emerge-webrsync
@@ -574,7 +574,7 @@ do_latest_snapshot() {
        # Daily snapshots are created at 00:45 and are not
        # available until after 01:00. Don't waste time trying
        # to fetch a snapshot before it's been created.
-       if [[ ${start_hour} -lt 1 ]] ; then
+       if [[ ${start_hour#0} -lt 1 ]] ; then
                (( start_time -= 86400 ))
        fi
 

Reply via email to