Re: [gentoo-portage-dev] [PATCH v2 9/9] max-age fixup

2018-02-04 Thread Michał Górny
W dniu pią, 02.02.2018 o godzinie 21∶42 +0100, użytkownik Michał Górny
napisał:
> ---
>  man/portage.5   | 2 +-
>  pym/portage/sync/modules/rsync/rsync.py | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/man/portage.5 b/man/portage.5
> index 2d5091109..549c51c73 100644
> --- a/man/portage.5
> +++ b/man/portage.5
> @@ -1091,7 +1091,7 @@ Number of parallel jobs to use when verifying nested 
> Manifests. Defaults
>  to the apparent number of processors.
>  .TP
>  .B sync\-rsync\-verify\-max\-age
> -Warn if repository is older than the specified number of hours. Disabled
> +Warn if repository is older than the specified number of days. Disabled
>  when 0. Defaults to disabled.
>  .TP
>  .B sync\-rsync\-verify\-metamanifest = yes|no
> diff --git a/pym/portage/sync/modules/rsync/rsync.py 
> b/pym/portage/sync/modules/rsync/rsync.py
> index 732298b3f..cc121e0fb 100644
> --- a/pym/portage/sync/modules/rsync/rsync.py
> +++ b/pym/portage/sync/modules/rsync/rsync.py
> @@ -355,8 +355,8 @@ class RsyncSync(NewBase):
>   if ts is None:
>   raise 
> RuntimeError('Timestamp not found in Manifest')
>   if (self.max_age != 0 and
> - 
> (datetime.datetime.utcnow() - ts.ts).hours > self.max_age):
> - out.ewarn('Manifest is 
> over 24 hours old, this is suspicious!')
> + 
> (datetime.datetime.utcnow() - ts.ts).days > self.max_age):
> + out.ewarn('Manifest is 
> over %d days old, this is suspicious!' % (self.max_age,))
>   out.ewarn('You may want 
> to try using another mirror and/or reporting this one:')
>   out.ewarn('  %s' % 
> (dosyncuri,))
>   out.ewarn('')

Note: I've merged this into 6/9 now.

-- 
Best regards,
Michał Górny




[gentoo-portage-dev] [PATCH v2 9/9] max-age fixup

2018-02-02 Thread Michał Górny
---
 man/portage.5   | 2 +-
 pym/portage/sync/modules/rsync/rsync.py | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/man/portage.5 b/man/portage.5
index 2d5091109..549c51c73 100644
--- a/man/portage.5
+++ b/man/portage.5
@@ -1091,7 +1091,7 @@ Number of parallel jobs to use when verifying nested 
Manifests. Defaults
 to the apparent number of processors.
 .TP
 .B sync\-rsync\-verify\-max\-age
-Warn if repository is older than the specified number of hours. Disabled
+Warn if repository is older than the specified number of days. Disabled
 when 0. Defaults to disabled.
 .TP
 .B sync\-rsync\-verify\-metamanifest = yes|no
diff --git a/pym/portage/sync/modules/rsync/rsync.py 
b/pym/portage/sync/modules/rsync/rsync.py
index 732298b3f..cc121e0fb 100644
--- a/pym/portage/sync/modules/rsync/rsync.py
+++ b/pym/portage/sync/modules/rsync/rsync.py
@@ -355,8 +355,8 @@ class RsyncSync(NewBase):
if ts is None:
raise 
RuntimeError('Timestamp not found in Manifest')
if (self.max_age != 0 and
-   
(datetime.datetime.utcnow() - ts.ts).hours > self.max_age):
-   out.ewarn('Manifest is 
over 24 hours old, this is suspicious!')
+   
(datetime.datetime.utcnow() - ts.ts).days > self.max_age):
+   out.ewarn('Manifest is 
over %d days old, this is suspicious!' % (self.max_age,))
out.ewarn('You may want 
to try using another mirror and/or reporting this one:')
out.ewarn('  %s' % 
(dosyncuri,))
out.ewarn('')
-- 
2.16.1