From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id OPQAHlEVDmXYAQAAauVa8A:P1 (envelope-from ) for ; Sat, 23 Sep 2023 00:29:37 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id OPQAHlEVDmXYAQAAauVa8A (envelope-from ) for ; Sat, 23 Sep 2023 00:29:37 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id EE2D6300BC for ; Sat, 23 Sep 2023 00:29:36 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=kB+jDDNP; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1695421777; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=lbJIuSS34XKou1KAAp0q0w8yQNp1j9kF2Ik0svE2RAw=; b=DQWF0Gxs4F2N37CE3iZldhosBGu51ADLjQB3VkgkiTMP4NdD9egEmbnNFle9xHeusxtDju W5qxlxbeH1z/44QP9NorODBXsjndWb0VQ27U8ri0QFsnchU6fj4Y6gSgjXyjZAoyPx0jix ug9uF4Bkmu8E5vdBYK15nI9z02ZKoHGMLMlaNiV6lg7pwTnrpQh2G54e+p+f/yzb7Se++V dgqRQKUI/6ipes+Ayut9lKTdizI8ASEc9yx3c5YFo2Hpa1GHAVk980RLRQT8jYddebJafO emLPb0cO5GuurIQLYgsiYIgpiERIIpo2bBMfdYe3gQio2seeJlsbvMMk5RzPuQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=kB+jDDNP; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1695421777; a=rsa-sha256; cv=none; b=B1+nSwZ9IobJNesbjpTXFjb7dGs+lRFURMvebvsFrPXhjRPtCq3OXgz7ju27yhtx8q4nkV dCFmHhNI/ik6VmaAnYsOec2Vt/2VfHrLIZc0CoVwER7/hpvJ9mDlZOHDDzIjIy8QvVPqRh LF3sqpD0HFBGxqGLttXIRVnYwVAMSkSV/y4mOYRanWSUHGSAm4hiCfgFiSXMm8gbs79ki2 tnagXvj9hqWipS1Jxx7SOKUofge7i7eWH9ANukUcIzZ1EecKWxeAPW0s6/1FTKR/RLGU0m 6f7SJ+o06xfgOekMF+6gyUZ3OjEcz5FiNsbitSytRPrjajc+q3KvCY0aId8bDw== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qjodx-0001hd-74; Fri, 22 Sep 2023 18:29:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qjodt-0001h7-Jr for guix-patches@gnu.org; Fri, 22 Sep 2023 18:28:58 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qjodt-0005t9-5m; Fri, 22 Sep 2023 18:28:57 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qjodz-0006l5-4A; Fri, 22 Sep 2023 18:29:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65866] [PATCH v2 2/8] git-download: Honor the =?UTF-8?Q?=E2=80=98GUIX=5FDOWNLOAD=5FFALLBACK=5FTEST=E2=80=99?= environment variable. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, rekado@elephly.net, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Fri, 22 Sep 2023 22:29:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65866 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 65866@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Christopher Baines , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 65866-submit@debbugs.gnu.org id=B65866.169542173825939 (code B ref 65866); Fri, 22 Sep 2023 22:29:03 +0000 Received: (at 65866) by debbugs.gnu.org; 22 Sep 2023 22:28:58 +0000 Received: from localhost ([127.0.0.1]:37402 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qjodt-0006k8-Aq for submit@debbugs.gnu.org; Fri, 22 Sep 2023 18:28:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45528) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qjodo-0006jI-Fp for 65866@debbugs.gnu.org; Fri, 22 Sep 2023 18:28:55 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qjodX-0005lu-Vm; Fri, 22 Sep 2023 18:28:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=lbJIuSS34XKou1KAAp0q0w8yQNp1j9kF2Ik0svE2RAw=; b=kB+jDDNPZ+oZ+91BsT5H 6vW2NEQYpnDQ10waBWfUMBlYK4M/RET3kJnTKE5ih3Twm3QRPPusGaZeP5pRjS5CdcDURgjxt4RqS aYzp6FsIaACaILu3+76VqbxjfsE8If1iYOIr8O8WQ4Cb8H5sSYd4FeDPbOR56Z9oTVwfgRJRi5OsS XPGtQdqI9J9KxCIQIa/XxOvjXdWSAB5y2+yHw2bdWVKkCEUwMc3sMNo7z2aZLAWnDE+bz/DWMl/hw p/TdFcWnrdTFf2wDiifOEzG2CpO7cVx92AvkBkIcHR5egwy1T84aBFyQXl/k/B7cpVJa/OqPPKPdg 4KKI1UKMBmBKYA==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Sat, 23 Sep 2023 00:27:58 +0200 Message-ID: <0c78818e6b49331c108195cdab1f37eff3d56dde.1695421391.git.ludo@gnu.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: <87o7hwas61.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -4.40 X-Migadu-Scanner: mx2.migadu.com X-Migadu-Queue-Id: EE2D6300BC X-Spam-Score: -4.40 X-TUID: 97i87rwhQm3a * guix/git-download.scm (git-fetch): Honor ‘%download-fallback-test’. --- guix/git-download.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/guix/git-download.scm b/guix/git-download.scm index 8989b1b463..f1f19397c6 100644 --- a/guix/git-download.scm +++ b/guix/git-download.scm @@ -28,6 +28,7 @@ (define-module (guix git-download) #:use-module (guix packages) #:use-module (guix modules) #:autoload (guix build-system gnu) (standard-packages) + #:autoload (guix download) (%download-fallback-test) #:autoload (git bindings) (libgit2-init!) #:autoload (git repository) (repository-open repository-close! @@ -161,7 +162,11 @@ (define* (git-fetch ref hash-algo hash ;; downloads. #:script-name "git-download" #:env-vars - `(("git url" . ,(git-reference-url ref)) + `(("git url" . ,(match (%download-fallback-test) + ('content-addressed-mirrors + "https://example.org/does-not-exist") + (_ + (git-reference-url ref)))) ("git commit" . ,(git-reference-commit ref)) ("git recursive?" . ,(object->string (git-reference-recursive? ref)))) -- 2.41.0