From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id WDqcNVS6RWEkOAAAgWs5BA (envelope-from ) for ; Sat, 18 Sep 2021 12:07:16 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 8OJ4MVS6RWGxRgAA1q6Kng (envelope-from ) for ; Sat, 18 Sep 2021 10:07:16 +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 415E81FFBE for ; Sat, 18 Sep 2021 12:07:16 +0200 (CEST) Received: from localhost ([::1]:33786 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mRXFb-0008Ow-Ap for larch@yhetil.org; Sat, 18 Sep 2021 06:07:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45612) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mRXFO-0008Ea-Na for bug-guix@gnu.org; Sat, 18 Sep 2021 06:07:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50278) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mRXFO-0000MR-G9 for bug-guix@gnu.org; Sat, 18 Sep 2021 06:07:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mRXFO-0004Bs-1S for bug-guix@gnu.org; Sat, 18 Sep 2021 06:07:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#44187: Channel clones lack SWH fallback Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 18 Sep 2021 10:07:01 +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: zimoun Received: via spool by 44187-submit@debbugs.gnu.org id=B44187.163195956416026 (code B ref 44187); Sat, 18 Sep 2021 10:07:01 +0000 Received: (at 44187) by debbugs.gnu.org; 18 Sep 2021 10:06:04 +0000 Received: from localhost ([127.0.0.1]:33591 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mRXES-0004AQ-HQ for submit@debbugs.gnu.org; Sat, 18 Sep 2021 06:06:04 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56486) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mRXER-00049Q-Cx for 44187@debbugs.gnu.org; Sat, 18 Sep 2021 06:06:03 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:48342) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mRXEM-0007na-9A; Sat, 18 Sep 2021 06:05:58 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=35796 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mRXEL-00045K-Ur; Sat, 18 Sep 2021 06:05:58 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87pn0dk61v.fsf@gnu.org> <20210910143415.14783-1-ludo@gnu.org> <20210910143415.14783-2-ludo@gnu.org> <874kajglbo.fsf_-_@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Jour du =?UTF-8?Q?G=C3=A9nie?= de =?UTF-8?Q?l'Ann=C3=A9e?= 229 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sat, 18 Sep 2021 12:05:56 +0200 In-Reply-To: <874kajglbo.fsf_-_@gmail.com> (zimoun's message of "Fri, 17 Sep 2021 19:31:55 +0200") Message-ID: <8735q2urjv.fsf@gnu.org> 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 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=1631959636; 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; bh=lEATh8HFJSFDJ83B/U6qHrFReEKAdP/YZr4qrBWtZT0=; b=dv6eG/XNo9XzoddcwxYjpEyDSy3/KFkOa251C4WYBLLpwRouUMO6kAEc1+YbnQzZEMzHJk 1WNb4rSDTSaAjY8IcbDlupEOHcRHo1OYL+/JC8q9bRvVte2JK98G4Rp0yEUj+7bThaYwLp eOEXWA+28hZqiCcDeQ7yNegyga0JWAgRMZfNbLMdnpaCTSGZsPkAEY5cAQO2FoMtpg24P+ lvDo/IgORHJ0qIpi2ypyMJESH6kH7Oif4xWqnlI5EmKdiBHluG1ykdnNKKmg0qJruAEyaz 6PDNJTrqJe9OEffhe4xZXcl85qf2/plSk44tOvn/11MyDHFla++jfGTxEmv2EQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1631959636; a=rsa-sha256; cv=none; b=RdMqbTmrDsFfXVQ1hPuu/GWMsaoB0EB0xyOdO+n+D8hWtBles3QcD314PC23B9rFYd8mZR BbG7Cx31038z8OldFkrn3m1nT+xroYI+sdDQFsCAl7A7II8k+indSom06LQUSOfF6W17Fo xLq42HECi2O5TT/UZUJhcBfbYa2pme+DDJ618wPr4v+8Y+pXBh51CADhMbAGBB3XZdjPuu zAUIQucLaeL12B/YBSfVQjSi/kaS7I9pngJAybolzvp1mNPrw0Bjmu5QaYRBAKtdrtKKsr WTsHwQamIcV9Lwi5ZZZuJEEMlJH8rAyZgagn5+vypG/hmS87qxV/UAMB05Z0Tw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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.39 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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: 415E81FFBE X-Spam-Score: -1.39 X-Migadu-Scanner: scn0.migadu.com X-TUID: Vc9Y7sCFpMeN Hi! zimoun skribis: > 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 s= everal 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 revisio= n))) >> + ('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= =99swh: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. =E2=80=98git-bare=E2=80=99 only makes sense for a revision, not a directory= , but I wonder if =E2=80=98flat=E2=80=99 can be used for a revision (in which case = it=E2=80=99d be equivalent to getting the corresponding directory)? I agree there=E2=80=99s some redundancy between directory/revision and flat/git-bare, but it=E2=80=99s the SWH API that looks like this, so I=E2= =80=99d be tempted to just keep it as is. Maybe we could ask for guidance on #swh-devel. Thanks! Ludo=E2=80=99.