commit:     d8285bad5815f0f2db64657dd245efc3fe948210
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Jan  3 06:08:53 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jan  3 19:59:51 2024 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=d8285bad

BinpkgFetcher: preserve mtime

The FileCopier from 1db44d18578a7aee58449cb97e1991cb06c915c3 doesn't preserve
its timestamp so there's a mismatch between the expected mtime in the index
and the binpkg.

Bug: https://bugs.gentoo.org/921208
Thanks-to: Zac Medico <zmedico <AT> gentoo.org>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 lib/_emerge/BinpkgFetcher.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/_emerge/BinpkgFetcher.py b/lib/_emerge/BinpkgFetcher.py
index 01b2bae637..a1524dc009 100644
--- a/lib/_emerge/BinpkgFetcher.py
+++ b/lib/_emerge/BinpkgFetcher.py
@@ -106,7 +106,8 @@ class BinpkgFetcher(CompositeTask):
                 finally:
                     if copier.isAlive():
                         copier.cancel()
-
+                if copier.returncode == os.EX_OK:
+                    fetcher.sync_timestamp()
             else:
                 fetcher.start()
                 try:

Reply via email to