From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1586778-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id E25CD158004
	for <garchives@archives.gentoo.org>; Wed,  3 Jan 2024 19:59:57 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 2B5EB2BC01D;
	Wed,  3 Jan 2024 19:59:57 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 0D4DF2BC017
	for <gentoo-commits@lists.gentoo.org>; Wed,  3 Jan 2024 19:59:57 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 4C78A34301B
	for <gentoo-commits@lists.gentoo.org>; Wed,  3 Jan 2024 19:59:56 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id DD883134D
	for <gentoo-commits@lists.gentoo.org>; Wed,  3 Jan 2024 19:59:54 +0000 (UTC)
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org>
Message-ID: <1704311991.d8285bad5815f0f2db64657dd245efc3fe948210.sam@gentoo>
Subject: [gentoo-commits] proj/portage:master commit in: lib/_emerge/
X-VCS-Repository: proj/portage
X-VCS-Files: lib/_emerge/BinpkgFetcher.py
X-VCS-Directories: lib/_emerge/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: d8285bad5815f0f2db64657dd245efc3fe948210
X-VCS-Branch: master
Date: Wed,  3 Jan 2024 19:59:54 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 496d67ba-5c00-456f-815f-358ded4fb778
X-Archives-Hash: 079dce2ff7fb2315345783d1560414f6

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: