From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 525CF158086 for ; Mon, 8 Nov 2021 22:37:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8D6A12BC042; Mon, 8 Nov 2021 22:37:45 +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 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 783DF2BC042 for ; Mon, 8 Nov 2021 22:37:45 +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 5175D342E18 for ; Mon, 8 Nov 2021 22:37:44 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C7D211A8 for ; Mon, 8 Nov 2021 22:37:42 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1636086168.776ede149514db41c9c08276594b43b2682ba1a4.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/package/ebuild/ X-VCS-Repository: proj/portage X-VCS-Files: lib/portage/package/ebuild/fetch.py X-VCS-Directories: lib/portage/package/ebuild/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 776ede149514db41c9c08276594b43b2682ba1a4 X-VCS-Branch: master Date: Mon, 8 Nov 2021 22:37:42 +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: beb2795e-8150-4f2e-8df6-ddb727588b48 X-Archives-Hash: 59df71ea774424481381f548facb11b4 commit: 776ede149514db41c9c08276594b43b2682ba1a4 Author: Zac Medico gentoo org> AuthorDate: Fri Nov 5 04:08:19 2021 +0000 Commit: Zac Medico gentoo org> CommitDate: Fri Nov 5 04:22:48 2021 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=776ede14 fetch: enable resume for digestgen case Enable resume for the digestgen case (no digests available), when the temporary file exceeds PORTAGE_FETCH_RESUME_MIN_SIZE. This fixes a case which caused the ebuild digest command to skip the download and fail with a message like this: !!! File b'/var/cache/distfiles/foo.tar.xz' doesn't exist, can't update Manifest Bug: https://bugs.gentoo.org/821571 Signed-off-by: Zac Medico gentoo.org> lib/portage/package/ebuild/fetch.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/portage/package/ebuild/fetch.py b/lib/portage/package/ebuild/fetch.py index 8c64362c2..2d3625800 100644 --- a/lib/portage/package/ebuild/fetch.py +++ b/lib/portage/package/ebuild/fetch.py @@ -1485,10 +1485,11 @@ def fetch( except EnvironmentError: pass elif not orig_digests: - # We don't have a digest, but the file exists. We must - # assume that it is fully downloaded. + # We don't have a digest, and the temporary file exists. if not force: - continue + # Try to resume this download when full + # download has not been explicitly forced. + fetched = 1 else: if ( mydigests[myfile].get("size") is not None