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 0PoxOurHNmGXKwAAgWs5BA (envelope-from ) for ; Tue, 07 Sep 2021 04:01:14 +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 aG4CNurHNmHhWgAA1q6Kng (envelope-from ) for ; Tue, 07 Sep 2021 02:01:14 +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 160691B26B for ; Tue, 7 Sep 2021 04:01:14 +0200 (CEST) Received: from localhost ([::1]:49126 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNQQD-0006r5-3p for larch@yhetil.org; Mon, 06 Sep 2021 22:01:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43578) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNQQ2-0006pf-C7 for guix-patches@gnu.org; Mon, 06 Sep 2021 22:01:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43334) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mNQQ2-0001oZ-3b for guix-patches@gnu.org; Mon, 06 Sep 2021 22:01:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mNQQ1-000660-Sk for guix-patches@gnu.org; Mon, 06 Sep 2021 22:01:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50072] [PATCH WIP 0/4] Add upstream updater for git-fetch origins. Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 07 Sep 2021 02:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50072 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 50072@debbugs.gnu.org Received: via spool by 50072-submit@debbugs.gnu.org id=B50072.163098000723354 (code B ref 50072); Tue, 07 Sep 2021 02:01:01 +0000 Received: (at 50072) by debbugs.gnu.org; 7 Sep 2021 02:00:07 +0000 Received: from localhost ([127.0.0.1]:54880 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNQP8-00064b-Rq for submit@debbugs.gnu.org; Mon, 06 Sep 2021 22:00:07 -0400 Received: from out2.migadu.com ([188.165.223.204]:20950) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNQP5-00063G-67 for 50072@debbugs.gnu.org; Mon, 06 Sep 2021 22:00:04 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1630980001; h=from:from: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: in-reply-to:in-reply-to:references:references; bh=sD4XhDKWWQF65W3dGTImGWwLVGH3Ic6CCmA7eteB6vE=; b=kgA6Tqo2QJE8t/TRhMmPfBuf3qMZk1DSeg6Yb7CyCu9AH7mrgijxuCOaIyzqaD+7gVjTLO i0/trvhW1Ta/KRo9VV7i4G6o4cE7TjH1c43msJ8U9+unHOP8jfOyPl3it221Oso7N7JY5E IzFIi3DmWFjCvONpTJzXHHNTd4uqNyo= From: Sarah Morgensen References: <8d1ae518b23fac5b15812a30b11df1c360ab3fbf.1629068119.git.iskarian@mgsn.dev> <87fsui80dd.fsf_-_@gnu.org> Date: Mon, 06 Sep 2021 18:59:59 -0700 In-Reply-To: <87fsui80dd.fsf_-_@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Mon, 06 Sep 2021 12:27:42 +0200 (14 hours, 48 minutes, 39 seconds ago)") Message-ID: <86k0jti1r4.fsf@mgsn.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Auth-User: iskarian@mgsn.dev 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" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1630980074; 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=sD4XhDKWWQF65W3dGTImGWwLVGH3Ic6CCmA7eteB6vE=; b=ptlWQ62SVqWFhETxbu5vNK6F3G4Xk7QIix8+GZcvbeWL8RYDfwj9+c7/eO1JQLgLh2tFxA 0QrkspIdmQNm7pdmb2+svIMniiu7Uf8a5gbngNLriTJhjVXJcXLCCJh9i6AVmfKz8rKfg3 IzRUwGJlfdlXDHWOZCBnpAKBytyUwCnXwgijN0jHemJs/C+w6a417vLIsoIV1HXn2imFcu BDcDjWZToHT82uVMoiZ1D3Ki0WomviytWbkHCmndLT0xWVe8YKZvyaQupANV7MQAyp6a+l 0cp+GRxh6tKj2zyx6ZEyKpPQuppKiVxG069PWQyg0eQEgWMoWSwE0TGOaE8RFA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1630980074; a=rsa-sha256; cv=none; b=isnRnPTaj09GvLzMighPXLsGsvOGClJ7kDZLZXnJLntmOlwYlSZpzfm+M7GPAdsi44hkUh 0VuVR1XdAKCSTAtj86jvXD3+3ngmTm3iJpfdsoI7azSoGT7kgmravg+AXcSZ07mYVy+s9f JD03AsqqOOL1zGY03qZ4Hx3/XRylZ915S1iHW1tR6r00pIj2S6Szg/srN+HSc3K3xFMcRm osJha38T7lLejU2ohXzkMEV1qvmYD7H4QLWJ9sgDsuMS5Pe8u4WRNfAi+bw+WEDxEKsm/9 F03LgXEvcMp2KWLFKAhNiV0KDYr+AcRAM0zsSJKCVZVm2jl5l84w8WeTmE/MOA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=kgA6Tqo2; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 0.18 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=kgA6Tqo2; dmarc=fail reason="SPF not aligned (relaxed)" header.from=mgsn.dev (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 160691B26B X-Spam-Score: 0.18 X-Migadu-Scanner: scn0.migadu.com X-TUID: Q8kZqM63ums2 Hi Ludo, Ludovic Court=C3=A8s writes: > Hi Sarah, > > I like this patch series. :-) Thanks for taking a look! > > Sarah Morgensen skribis: > >> * guix/git-download.scm (checkout-to-store): New procedure. >> * guix/upstream.scm (guess-version-transform) >> (package-update/git-fetch): New procedures. >> (%method-updates): Add GIT-FETCH mapping. > > This LGTM. Thanks. WDYT about pre-emptively adding support for non-url URIs as well? That is, 1. change "urls" in to "uri" 2. in 'git-fetch' a) if the upstream-source-uri is a git-reference, just use it as-is rather than guessing the tag b) if it's not, return an 'upstream-source' with a git-reference URI=20 3. update 'upstream-source-compiler' to work for git-reference URIs. If there are no objections, I think I'll make those changes and send that as a proper patch. > > Nitpick: > >> +(define* (checkout-to-store store ref #:key (log (current-error-port))) >> + "Checkout REF to STORE. Write progress reports to LOG. RECURSIVE? h= as the >> +same effect as the same-named parameter of 'latest-repository-commit'." >> + ;; XXX: (guix git) does not use shallow clones, so this will be slow >> + ;; for long-running repositories. >> + (match-record ref > > [...] > >> + ;; Only use the first element of URLS. >> + (match-record source >> + (version urls) > > I=E2=80=99d use the record acceesors in this cases rather than =E2=80=98m= atch-record=E2=80=99; > currently =E2=80=98match-record=E2=80=99 is not super efficient and I fin= d it slightly > less readable when you=E2=80=99re just accessing a couple of fields. Fair. I got a little excited to discover new syntax :) -- Sarah