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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id BF7D01382C5 for ; Sun, 10 Jan 2021 03:24:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D6D2EE086F; Sun, 10 Jan 2021 03:24:14 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 422A0E086F for ; Sun, 10 Jan 2021 03:24:13 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 38510340836 for ; Sun, 10 Jan 2021 03:24:12 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 990293A6 for ; Sun, 10 Jan 2021 03:24:10 +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: <1610248963.f04dae7728b558ba10b99d1b4979054825fbb0d6.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: man/, lib/portage/package/ebuild/ X-VCS-Repository: proj/portage X-VCS-Files: lib/portage/package/ebuild/fetch.py man/make.conf.5 X-VCS-Directories: lib/portage/package/ebuild/ man/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: f04dae7728b558ba10b99d1b4979054825fbb0d6 X-VCS-Branch: master Date: Sun, 10 Jan 2021 03:24:10 +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: 92f98fd4-59b4-48d8-b96f-03937d214f15 X-Archives-Hash: d4cfbe4d7139d53a4355a5b44751d1c2 commit: f04dae7728b558ba10b99d1b4979054825fbb0d6 Author: Daniel M. Weeks danweeks net> AuthorDate: Wed Jan 6 18:35:37 2021 +0000 Commit: Zac Medico gentoo org> CommitDate: Sun Jan 10 03:22:43 2021 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=f04dae77 Make digests available to fetch command This makes it possible for the fetch command to utilize a protocol/service that identifies files by their hash. Closes: https://github.com/gentoo/portage/pull/655 Signed-off-by: Daniel M. Weeks danweeks.net> Signed-off-by: Zac Medico gentoo.org> lib/portage/package/ebuild/fetch.py | 6 ++++++ man/make.conf.5 | 14 +++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/lib/portage/package/ebuild/fetch.py b/lib/portage/package/ebuild/fetch.py index 7be9d0239..e0fecaf23 100644 --- a/lib/portage/package/ebuild/fetch.py +++ b/lib/portage/package/ebuild/fetch.py @@ -1291,6 +1291,12 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, "FILE": os.path.basename(download_path) } + try: + variables['DIGESTS'] = " ".join(["%s:%s" % (k.lower(), v) + for k, v in mydigests[myfile].items() if k != 'size']) + except KeyError: + pass + for k in ("DISTDIR", "PORTAGE_SSH_OPTS"): v = mysettings.get(k) if v is not None: diff --git a/man/make.conf.5 b/man/make.conf.5 index 494d5a212..f6eae6f60 100644 --- a/man/make.conf.5 +++ b/man/make.conf.5 @@ -1,4 +1,4 @@ -.TH "MAKE.CONF" "5" "Sep 2020" "Portage VERSION" "Portage" +.TH "MAKE.CONF" "5" "Jan 2021" "Portage VERSION" "Portage" .SH "NAME" make.conf \- custom settings for Portage .SH "SYNOPSIS" @@ -746,6 +746,18 @@ the internet. It must contain the full path to the executable as well as the place\-holders \\${DISTDIR}, \\${FILE} and \\${URI}. The command should be written to place the fetched file at \\${DISTDIR}/\\${FILE}. Also see \fBRESUMECOMMAND\fR. +.RS +.TP +.B Optional FETCHCOMMAND Placeholders +.TS +l l l +___ +l l l. +Placeholder Meaning Example + +\\${DIGESTS} Space separated list of file digests blake2b sha512 +.TE +.RE .TP .B FFLAGS FCFLAGS Use these variables to set the desired optimization/CPU instruction settings