From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id AGnjNdXxEGF8igAAgWs5BA (envelope-from ) for ; Mon, 09 Aug 2021 11:13:57 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id KKR6MdXxEGGycgAAbx9fmQ (envelope-from ) for ; Mon, 09 Aug 2021 09:13:57 +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 701731F93C for ; Mon, 9 Aug 2021 11:13:57 +0200 (CEST) Received: from localhost ([::1]:36452 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mD1M3-0007yK-Vv for larch@yhetil.org; Mon, 09 Aug 2021 05:13:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38166) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mD1LC-0006YM-0v for guix-patches@gnu.org; Mon, 09 Aug 2021 05:13:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:44199) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mD1LB-0001Dr-Q0 for guix-patches@gnu.org; Mon, 09 Aug 2021 05:13:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mD1LB-0000k7-MG for guix-patches@gnu.org; Mon, 09 Aug 2021 05:13:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49252] [PATCH] Channels defaulting to HEAD instead of =?UTF-8?Q?=E2=80=98master=E2=80=99?= Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 09 Aug 2021 09:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49252 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Kyle Meyer Cc: Ricardo Wurmus , 49252@debbugs.gnu.org Received: via spool by 49252-submit@debbugs.gnu.org id=B49252.16285003412791 (code B ref 49252); Mon, 09 Aug 2021 09:13:01 +0000 Received: (at 49252) by debbugs.gnu.org; 9 Aug 2021 09:12:21 +0000 Received: from localhost ([127.0.0.1]:55739 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mD1KW-0000iw-QX for submit@debbugs.gnu.org; Mon, 09 Aug 2021 05:12:21 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57310) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mD1KU-0000ii-0F for 49252@debbugs.gnu.org; Mon, 09 Aug 2021 05:12:19 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34390) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mD1KN-0000cB-7u; Mon, 09 Aug 2021 05:12:11 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=45038 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mD1KM-0005f8-VJ; Mon, 09 Aug 2021 05:12:11 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87y2auw3jo.fsf@inria.fr> <87fswo8goa.fsf@kyleam.com> <87h7g5p7yi.fsf@gnu.org> <87k0kv8qka.fsf@kyleam.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 22 Thermidor an 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: Mon, 09 Aug 2021 11:12:08 +0200 In-Reply-To: <87k0kv8qka.fsf@kyleam.com> (Kyle Meyer's message of "Sun, 08 Aug 2021 19:28:05 -0400") Message-ID: <87wnovyobb.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: 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=1628500437; 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=Ctb+c5VEr0gCr75YEaC2rYxMxUUdT5BdPGcqNxGXR9E=; b=tN8Mv3nsgPXzK3DLB+ehiM8mkrc6GNYsnQDjBayrMgBvuHQXy8bkuQUnFtQkU1NjoywPwC 7yPVqC9mWaBHbE6aEKwvoMtSGDYK2V0wsAHqQZIaUobPL7iB71sITysR71y4VKn6grpBgJ NLVI0Mp/WKkpPPEx4pjsjmGb+kq8XMEn1s7gt/Wq9aWseecesdCVhe1OW7Dw1VN0fZgq+o b4cJ1I1FYK/Gqx/acDzgAJh5YrX2nrnVM4Nhr4f5aPG4hXGBnmYcL+fgQnsICgTlgcNAFr XERPsdZdoHMGwa7FInkfL+oHojGsLib61QXCzUUSYTlliw1+zDvQ4nTylLViFA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1628500437; a=rsa-sha256; cv=none; b=S8G/hxPG3wo8FJrxgloxBeqVGYWwFudl7vXhehxzMhTRtzBhtCDuiIKvXCp+poxeWuS5hS GOvPk5+Eg2KYdn0UFEYrLyu78fz2+NVAE9VQ/JDx3oFr460vDTfUgPtaBuAFMoliYf8vPi 7/f7TEIwxOpwC1LJUO2MzvWKQhlpYRzg6RgckG7sDbAsDbi++ZgdLlG9p30Ihg8znAhAEl JCdulVrP3MTuCLV+RbUrl5bqHCfgFibgkpnVQbDyHzkcIjwv44jvf1BhW6lU7BPqor7sO2 RKTJ0njMoymNvOOLb5yJ/uJ4aNVmwFdThFY8imVjnyIIzQhH6HxIJGPeyrbCoQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=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-Spam-Score: -2.91 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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: 701731F93C X-Spam-Score: -2.91 X-Migadu-Scanner: scn0.migadu.com X-TUID: 4xOh+lgQE796 Hello Kyle, Kyle Meyer skribis: > Ludovic Court=C3=A8s writes: > >> Kyle Meyer skribis: > [...] >>> >>> Hmm, it looks like it's there: >>> >>> $ git ls-remote https://git.savannah.gnu.org/git/guix.git | grep HEAD >>> e499500730de23fd54ae63696a725d4b90a406d7 HEAD >>> >>> $ git clone https://git.savannah.gnu.org/git/guix.git && cd guix >>> $ git for-each-ref refs/remotes/origin | grep HEAD >>> e499500730de23fd54ae63696a725d4b90a406d7 commit refs/remotes/origin/H= EAD >>> $ git name-rev refs/remotes/origin/HEAD >>> refs/remotes/origin/HEAD master >> >> OK, so something else must be at fault. >> >> Ideas? > > My understanding is that the clone is happening through guile-git, which > uses libgit2. In libgit2's v1.1.0 release notes, I see "[t]he > refs/remotes/origin/HEAD file will be created at clone time to point to > the origin's default branch". So my current guess is that this clone > was made before guix's libgit2 was 1.1.0. > > Does that sound possible (i.e. this clone is from before 2020-12-ish)? > Do you still see the "reference 'refs/remotes/origin/HEAD' not found" > failure if you force a fresh clone? Oh, this must be the reason. If I remove the cached clone: rm -rf ~/.cache/guix/checkouts/pjmkglp4t7znuugeurpurzikxq3tnlaywmisyr27sh= j7apsnalwq and then clone again, it works: --8<---------------cut here---------------start------------->8--- scheme@(guile-user)> ,use(guix git) scheme@(guile-user)> (update-cached-checkout "https://git.savannah.gnu.org/= git/guix.git") $2 =3D "/home/ludo/.cache/guix/checkouts/pjmkglp4t7znuugeurpurzikxq3tnlaywm= isyr27shj7apsnalwq" $3 =3D "30289f4d4638452520f52c1a36240220d0d940ff" $4 =3D #f --8<---------------cut here---------------end--------------->8--- Likewise with the other repo Ricardo mentions: --8<---------------cut here---------------start------------->8--- scheme@(guile-user)> (update-cached-checkout "https://github.com/ImmuneDyna= mics/Spectre") $5 =3D "/home/ludo/.cache/guix/checkouts/lpz4iyuu3pztx73ks74bfiymewyzn24rm5= 65l6cgiutvjow5joka" $6 =3D "742ebc4bc09ce69b970eceb78291bdbf5229d20d" $7 =3D #f --8<---------------cut here---------------end--------------->8--- I suppose we need to add a call to fetch remote heads when they=E2=80=99re missing? It seems that calling =E2=80=98remote-fetch=E2=80=99 is not enoug= h. If I explicitly remove =E2=80=98HEAD=E2=80=99 from the clone, then I get: --8<---------------cut here---------------start------------->8--- scheme@(guile-user)> (define r (repository-open "/home/ludo/.cache/guix/che= ckouts/lpz4iyuu3pztx73ks74bfiymewyzn24rm565l6cgiutvjow5joka")) scheme@(guile-user)> (reference-name->oid r "refs/remotes/origin/HEAD") ice-9/boot-9.scm:1685:16: In procedure raise-exception: Git error: reference 'refs/remotes/origin/HEAD' not found Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue. scheme@(guile-user) [1]> ,q scheme@(guile-user)> (remote-fetch (remote-lookup r "origin")) scheme@(guile-user)> (reference-name->oid r "refs/remotes/origin/HEAD") ice-9/boot-9.scm:1685:16: In procedure raise-exception: Git error: reference 'refs/remotes/origin/HEAD' not found Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue. scheme@(guile-user) [1]> ,q --8<---------------cut here---------------end--------------->8--- Calling =E2=80=98remote-ls=E2=80=99 doesn=E2=80=99t populate that file eith= er: --8<---------------cut here---------------start------------->8--- scheme@(guile-user)> (define o (remote-lookup r "origin")) scheme@(guile-user)> (remote-connect o) scheme@(guile-user)> (remote-ls o) $13 =3D (#< local: 0 oid: # loid: # name: "HE= AD" symref-target: 73408368> #< local: 0 oid: # loid: # name: "refs/heads/development" symref-target: 0> #<= local: 0 oid: # loid: # name: "refs/heads/master" symref-= target: 0> #< local: 0 oid: # loid: # name: "= refs/heads/pre-release" symref-target: 0> [=E2=80=A6]) --8<---------------cut here---------------end--------------->8--- So I=E2=80=99m not sure what the best approach is. Thoughts? Ludo=E2=80=99.