From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 finch.gentoo.org (Postfix) with ESMTPS id 2A663158200 for ; Sun, 14 Sep 2025 09:33:23 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id E88B3340FD3 for ; Sun, 14 Sep 2025 09:33:22 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id D140E110571; Sun, 14 Sep 2025 09:33:19 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.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) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id C0DE7110571 for ; Sun, 14 Sep 2025 09:33:19 +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) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 77AFC340F6A for ; Sun, 14 Sep 2025 09:33:19 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0BAB83995 for ; Sun, 14 Sep 2025 09:33:18 +0000 (UTC) From: "Sam James" 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" Message-ID: <1757842383.ccebae2e51cbbd03a30d5e3599ee82f974643fd2.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: /, lib/portage/dbapi/ X-VCS-Repository: proj/portage X-VCS-Files: NEWS lib/portage/dbapi/bintree.py X-VCS-Directories: / lib/portage/dbapi/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: ccebae2e51cbbd03a30d5e3599ee82f974643fd2 X-VCS-Branch: master Date: Sun, 14 Sep 2025 09:33:18 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: bfa88283-493d-4ea1-a8d2-3dc1590e09c1 X-Archives-Hash: 0cd6a4759b80edfe0b836c146b80eb57 commit: ccebae2e51cbbd03a30d5e3599ee82f974643fd2 Author: Florian Schmaus gentoo org> AuthorDate: Sun Sep 14 08:15:21 2025 +0000 Commit: Sam James gentoo org> CommitDate: Sun Sep 14 09:33:03 2025 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=ccebae2e bintree: Prefer 'Last-Modified' over 'timestamp' header The Last-Modified header is a standard header and seems to be more in sync accross different mirrors than 'timestamp'. Prefer it over 'timestamp'. Signed-off-by: Florian Schmaus gentoo.org> Part-of: https://github.com/gentoo/portage/pull/1466 Closes: https://github.com/gentoo/portage/pull/1466 Signed-off-by: Sam James gentoo.org> NEWS | 5 ++++- lib/portage/dbapi/bintree.py | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 71edb962fa..04e47696d4 100644 --- a/NEWS +++ b/NEWS @@ -9,7 +9,10 @@ Release notes take the form of the following optional categories: portage-3.0.70 (UNRELEASED) -------------- -TODO +Features + +* Prefer the 'Last-Modified' over the 'timestamp' HTTP header when + querying binhosts. portage-3.0.69 (2025-09-14) -------------- diff --git a/lib/portage/dbapi/bintree.py b/lib/portage/dbapi/bintree.py index 2fdb08d44b..8e69fe3b89 100644 --- a/lib/portage/dbapi/bintree.py +++ b/lib/portage/dbapi/bintree.py @@ -1466,13 +1466,13 @@ class binarytree: proxies=proxies, ) if hasattr(f, "headers"): - if f.headers.get("timestamp", ""): - remote_timestamp = f.headers.get("timestamp") - elif f.headers.get("Last-Modified", ""): + if f.headers.get("Last-Modified", ""): last_modified = f.headers.get("Last-Modified") remote_timestamp = http_to_timestamp( last_modified ) + elif f.headers.get("timestamp", ""): + remote_timestamp = f.headers.get("timestamp") if ( remote_timestamp and local_timestamp