From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id pWp3JJLRRGEtJgAAgWs5BA (envelope-from ) for ; Fri, 17 Sep 2021 19:34:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 0OFvH5LRRGGLbgAAB5/wlQ (envelope-from ) for ; Fri, 17 Sep 2021 17:34:10 +0000 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 E580319C2B for ; Fri, 17 Sep 2021 19:34:09 +0200 (CEST) Received: from localhost ([::1]:60868 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mRHkX-0002xy-1q for larch@yhetil.org; Fri, 17 Sep 2021 13:34:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52298) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mRHjS-00018g-Kl for bug-guix@gnu.org; Fri, 17 Sep 2021 13:33:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49611) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mRHjS-0002Sr-Cf for bug-guix@gnu.org; Fri, 17 Sep 2021 13:33:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mRHjS-0008Hj-7m for bug-guix@gnu.org; Fri, 17 Sep 2021 13:33:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#44187: Channel clones lack SWH fallback Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 17 Sep 2021 17:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44187 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 44187-submit@debbugs.gnu.org id=B44187.163189994431800 (code B ref 44187); Fri, 17 Sep 2021 17:33:02 +0000 Received: (at 44187) by debbugs.gnu.org; 17 Sep 2021 17:32:24 +0000 Received: from localhost ([127.0.0.1]:32924 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mRHip-0008Gq-WE for submit@debbugs.gnu.org; Fri, 17 Sep 2021 13:32:24 -0400 Received: from mail-wr1-f48.google.com ([209.85.221.48]:42842) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mRHio-0008Gc-3x for 44187@debbugs.gnu.org; Fri, 17 Sep 2021 13:32:22 -0400 Received: by mail-wr1-f48.google.com with SMTP id q11so16369828wrr.9 for <44187@debbugs.gnu.org>; Fri, 17 Sep 2021 10:32:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=WAX+IK5Bm1OWbhPGhD+Nr1QDajBLKIM/cEpIGCRQI4M=; b=i/L+wnh7RUJFapYlEE1IoSatMOpdkUqAe94vNlNYirBNQeusd/wNZYzXigHIjPOtNr h3E+37v/kHk7CSZqKm2nQDnbYcPkVKpuuzUfF6DvW04wrkJvPCap2nlS0idYZCgFRSDo 3gWR5iXfyHe+DmIca/rhyNIYotqaFj/GWdggrtTGK1ScyD/uX0M+rfwVOBX/IMWSXI2x 1FuBokIV11DYwBpmAZC+FtxSUB+dvt5CEzeCkEtG90rqHwC6OXlOmQoHjSzxCCA2zXdu s/UW8IBctq1IHd3pFHhliWdsaaZrymdC6APEbCzp4vZZzIX0erYuHd+x2A7MHshhzJ6o B8VA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=WAX+IK5Bm1OWbhPGhD+Nr1QDajBLKIM/cEpIGCRQI4M=; b=pXMiqVIZpTX5DgiAwklFD+NzStIR3D0sHlGU0JZqZcCU35AMOdPjeuZRvaLB0ic0XY 0aINzRR7iFC+xOTDyOnHQHozYMGn7HiA3ulwCcPvpT8K3VAN24UgZwRzUhbdYpe3A9ZL PJiLEbV7okzyr361bll8IaI2nXtbN+TuEBfLBpsMwIXs5r0Fbb7lXHjuL0G4wXAgvKkh MU47jA1jbZyzVYVcIOtTrftbsIzDXrvx2VWJcJosLgMyA22/9qXep1dYf2LIhmD8k2e2 kw4IRzPoh5ZGFJwGAXNXaAgwzBMErPr+btvgCA/NftJ3vjUx+8NEKOlQ6zV1ZZoItFjk gGSQ== X-Gm-Message-State: AOAM533eX6m1oliQdRxqZdoA8Hfvk8jqRJwME8Blhx7kXF7XRhyYVT0v X5BSJYnLKLBkIHvXNVzI2jE= X-Google-Smtp-Source: ABdhPJz1AgDnn1j9Y8SArYbUFqcTE9mn2+tNeS4Y9wu+qBMprcDadG4RaG9hNxuvBSgLNml6WPcqbA== X-Received: by 2002:a5d:4b0b:: with SMTP id v11mr13815652wrq.359.1631899936080; Fri, 17 Sep 2021 10:32:16 -0700 (PDT) Received: from pfiuh02 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id i2sm6985420wrq.78.2021.09.17.10.32.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Sep 2021 10:32:15 -0700 (PDT) From: zimoun References: <87pn0dk61v.fsf@gnu.org> <20210910143415.14783-1-ludo@gnu.org> <20210910143415.14783-2-ludo@gnu.org> Date: Fri, 17 Sep 2021 19:31:55 +0200 In-Reply-To: <20210910143415.14783-2-ludo@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Fri, 10 Sep 2021 16:34:13 +0200") Message-ID: <874kajglbo.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 44187@debbugs.gnu.org, Ludovic =?UTF-8?Q?Court=C3=A8s?= Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1631900050; 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=WAX+IK5Bm1OWbhPGhD+Nr1QDajBLKIM/cEpIGCRQI4M=; b=EcYddx3MQdETZtDt7NFBFuf2+IISVG1x4sSt/GWLA689Y2KfhjwGuPfPVOpq8Z05ye218N DvzwVb82vNBMYvMzVDOHU/n8WgHQiXpdK/4cKXepVlLgwR2bxyB/gKlzeMA+fXTq1Hnz3G 7P01gcauYEK6NuLu2A0j5HeFIt0RERALZ2AoWP1Ia+m+v6c1Mv36vKAIG/6RkHO08etgZw +0vHDKxO+neAAsukM/U6qLKoSOigdOLLEPqZrGoQRkNWGFOrt780tWKPyQcDjurMbWWBod 5Jn4bdAoygNy3GOS4AWQFeXvs3tfOqa+neHC1c8MlRaMT/FfBkky/3JEuDBr1Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1631900050; a=rsa-sha256; cv=none; b=q04rcU0VS2DohqZHkLP+ZGsxlbUIZ5pasiMVQH1pbM/SjU3l/Fo9qf1OR6Iub313ctFME1 Nv3fHN8WhFdA79w2qhG91w5ULoHRciiNvIKGcpED/2c7IgnApcDxLlqwDyxXSZ+sNY9rG5 7aClVc1zu3dlFrmAyA8OAeUJwb5boeh/P9NrIhwDcY4dEvRinuDQGGw6YhWiXXSq6L4WNq yrQ3zfhNqw0W4ugPxCPH6F9ZcCN8sMIYALYaCi05uKpRN61Zf/O8JiaoIs13FyjIM5Jkcy waijxIrwfcfxIcu5JXgBgpTw9zJRNLDMSqOg+tjU+eMXrTE+L2PV9IdpFjJ/7w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b="i/L+wnh7"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -1.30 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b="i/L+wnh7"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: E580319C2B X-Spam-Score: -1.30 X-Migadu-Scanner: scn0.migadu.com X-TUID: 3ptKZ35bakuW Hi Ludo, The patch LGTM although there is a redundancy, from my understanding. On Fri, 10 Sep 2021 at 16:34, Ludovic Court=C3=A8s wrote: > @@ -694,7 +714,15 @@ wait until it becomes available, which could take se= veral minutes." > (format log-port "SWH: found revision ~a with directory at '~a'~%" > (revision-id revision) > (swh-url (revision-directory-url revision))) > - (swh-download-directory (revision-directory revision) output > - #:log-port log-port)) > + (swh-download-archive (match archive-type > + ('flat > + (string-append > + "swh:1:dir:" (revision-directory revision= ))) > + ('git-bare > + (string-append > + "swh:1:rev:" (revision-id revision)))) Here the =E2=80=99swid=E2=80=99 depends on the =E2=80=99archive-type=E2=80= =99=E2=80=A6 > + output > + #:archive-type archive-type =E2=80=A6which is also passed. Then this is propagated. For instance, =E2=80=99swh-download-directory=E2=80=99: > +(define* (swh-download-directory id output > + #:key (log-port (current-error-port))) > + "Download from Software Heritage the directory with the given ID, and > +unpack it to OUTPUT. Return #t on success and #f on failure." > + (swh-download-archive (string-append "swh:1:dir:" id) output > + #:archive-type 'flat > + #:log-port log-port)) > + Does it make sense to pass this =E2=80=99swhid=E2=80=99 equal to =E2=80=99s= wh:1:rev=E2=80=99 with the =E2=80=99flat=E2=80=99 archive-type? Another instance is, > + (match (vault-fetch swhid > + #:archive-type archive-type > + #:log-port log-port) and from my understanding, again =E2=80=99swhid=E2=80=99 depends on =E2=80= =99archive-type=E2=80=99. Therefore, it prone error. The best seems to pass =E2=80=99(archive-type . swhid)=E2=80=99 and pattern-match on that. Yeah, it potentially breaks t= he public API=E2=80=A6 but there is no claim about stability (and I am not convinced this (guix swh) module is used outside Guix :-)). Cheers, simon