From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id YC/mDEb0NWH0EQAAgWs5BA (envelope-from ) for ; Mon, 06 Sep 2021 12:58: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 mp2 with LMTPS id WH/jCEb0NWFMPwAAB5/wlQ (envelope-from ) for ; Mon, 06 Sep 2021 10:58: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 2FF0FB529 for ; Mon, 6 Sep 2021 12:58:13 +0200 (CEST) Received: from localhost ([::1]:32948 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNCKK-0000xp-8S for larch@yhetil.org; Mon, 06 Sep 2021 06:58:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55738) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNCKA-0000wm-Tq for guix-patches@gnu.org; Mon, 06 Sep 2021 06:58:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:40563) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mNCKA-00018F-MY for guix-patches@gnu.org; Mon, 06 Sep 2021 06:58:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mNCKA-0005SA-MA for guix-patches@gnu.org; Mon, 06 Sep 2021 06:58:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50426] [PATCH] import: elpa: Don't hardcode default branch to 'master'. Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 06 Sep 2021 10:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 50426 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50426@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163092584120913 (code B ref -1); Mon, 06 Sep 2021 10:58:02 +0000 Received: (at submit) by debbugs.gnu.org; 6 Sep 2021 10:57:21 +0000 Received: from localhost ([127.0.0.1]:52109 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNCJV-0005RA-8K for submit@debbugs.gnu.org; Mon, 06 Sep 2021 06:57:21 -0400 Received: from lists.gnu.org ([209.51.188.17]:35936) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNCJP-0005Qw-9Y for submit@debbugs.gnu.org; Mon, 06 Sep 2021 06:57:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55514) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNCJO-0000cs-0p for guix-patches@gnu.org; Mon, 06 Sep 2021 06:57:14 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:56132 helo=mail.yoctocell.xyz) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNCJL-0000LO-Fc for guix-patches@gnu.org; Mon, 06 Sep 2021 06:57:13 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1630925825; bh=zvtc+Usc5TcstdMdjk8Juu1HB9FJ3YduT+mo/DONu60=; h=From:To:Subject:Date; b=IDVzn10XndCt7M9m/CDpQEoI4s4muWIQDKXn8yCFYqy2HvE8SO2QtbTvHj3+CHnmp nElYD1ueeoAsUWnC5GW0mFICjW2SlCRxiodk1ubDo2bH/dOe5wVpn+4g5Hq14M/ZKA KW98aonr+kPaXG03/PF+QdI4v3XY75p5dt/hLOqs= Message-Id: <7a5a35f29121ebbb2e1ec1fe991159fbf6bae2e4.1630925679.git.public@yoctocell.xyz> Date: Mon, 06 Sep 2021 12:57:04 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=87.96.130.155; envelope-from=public@yoctocell.xyz; helo=mail.yoctocell.xyz X-Spam_score_int: 28 X-Spam_score: 2.8 X-Spam_bar: ++ X-Spam_report: (2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FROM_SUSPICIOUS_NTLD=0.499, FROM_SUSPICIOUS_NTLD_FP=1.419, PDS_OTHER_BAD_TLD=1.999, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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=1630925893; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=QgqPFvSIOSjj1lpFZjgtBeR3efbeun6V4rCmpsC/j2c=; b=pQtqlqu2dETkHNP/CaZI4++eIU/x+0P6O2RHfF/oyhwBE/KwL/uKS1xbdaTb9I0mGGFteI LqvQt13qe6caIMWrkOx9WAvdBnEuzDhqHLFa4ylgo32+1xx+8fbhQ7IHxpDanNlymVTlK1 5KRa0VpQKC/m4lR+oe7p5N47jlS1zejAtRoOh0yhhGyfG+eCkJT0XFR9716FhsPmztcT8j xVa0PrupqaT22JB4y2J5uaqFJPq5FceadxzzFSTH58bZr+s5AWUuuRsrTF/XmmlpIa2S3R qArbpHYYUN1OyuP7jHqf1g4SNCvofJC1sEdPA+R2+5IlNKiCY/uIZfYS0I0lxA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1630925893; a=rsa-sha256; cv=none; b=CivXt7ge7WBRPe1kJ1ZS7jiwrJzenr4+HBlJUr13x9Z68GxntvEvDGCWNlWJCLiDsap3cq jbUNv/psInil5xQFxHc5NAKGELE6YLxESjjqmq+sENP/q6yZ85BwePM1G+iiXvOE5YziOf AFe5MZYfBpi0THjJuRsbGhL6uR6ncF+eQCcaPtTyAhwK1qyiDHb/8dbAlp6k6VCQMGDznN PIMOd2FdJtoQpXiMvMd0331Qa9nzSgniID0R2ATLkmvnTWWM+Y6Z2xDso7iem8F97s2dzU 1M/X5NjS4Zsy1wZOeHx0RXoRN4YNsd2TTK7VS1AGez2pZtPrelRbOilR4vMagw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=IDVzn10X; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (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-Spam-Score: -0.31 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=IDVzn10X; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (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: 2FF0FB529 X-Spam-Score: -0.31 X-Migadu-Scanner: scn0.migadu.com X-TUID: xvQ/Rn0+lXKc Otherwise, remotes without a branch named 'master' will cause an error when importing. * guix/import/elpa (git-repository->origin): Fallback to HEAD instead of the 'master' branch. --- For example, try to import the =E2=80=98consult=E2=80=99 package from MELPA: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix import elpa -a melpa consult ;;; note: source file /home/yoctocell/src/guix/guix/import/elpa.scm ;;; newer than compiled /home/yoctocell/src/guix/guix/import/elpa.go ;;; note: source file /home/yoctocell/src/guix/guix/import/elpa.scm ;;; newer than compiled /home/yoctocell/.config/guix/current/lib/guil= e/3.0/site-ccache/guix/import/elpa.go ;;; note: source file /home/yoctocell/src/guix/guix/import/elpa.scm ;;; newer than compiled /home/yoctocell/.guix-home/profile/lib/guile/= 3.0/site-ccache/guix/import/elpa.go Backtrace: In ice-9/boot-9.scm: 1752:10 16 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _) In unknown file: 15 (apply-smob/0 #) In ice-9/boot-9.scm: 724:2 14 (call-with-prompt _ _ #) In ice-9/eval.scm: 619:8 13 (_ #(#(#))) In guix/ui.scm: 2185:7 12 (run-guix . _) 2148:10 11 (run-guix-command _ . _) In guix/scripts/import.scm: 121:11 10 (guix-import . _) In guix/scripts/import/elpa.scm: 104:23 9 (guix-import-elpa . _) In guix/import/elpa.scm: 207:2 8 (elpa->guix-package _ #:repo _ #:version _) In ice-9/boot-9.scm: 1752:10 7 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _) In guix/store.scm: 658:37 6 (thunk) In guix/git.scm: 481:8 5 (latest-repository-commit # "https://github.com/=E2=80=A6" =E2=80=A6) 247:4 4 (update-cached-checkout _ #:ref _ #:recursive? _ #:check-out? = _ #:starting-commit _ # _ =E2=80=A6) 211:19 3 (resolve _) In git/branch.scm: 101:8 2 (_ _ _ _) In git/bindings.scm: 77:2 1 (raise-git-error _) In ice-9/boot-9.scm: 1685:16 0 (raise-exception _ #:continuable? _) ice-9/boot-9.scm:1685:16: In procedure raise-exception: Git error: cannot locate remote-tracking branch 'origin/master' --8<---------------cut here---------------end--------------->8--- guix/import/elpa.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/guix/import/elpa.scm b/guix/import/elpa.scm index c0dc5acf51..f9689aaa13 100644 --- a/guix/import/elpa.scm +++ b/guix/import/elpa.scm @@ -4,6 +4,7 @@ ;;; Copyright =C2=A9 2018 Oleg Pykhalov ;;; Copyright =C2=A9 2020 Martin Becze ;;; Copyright =C2=A9 2020 Ricardo Wurmus +;;; Copyright =C2=A9 2021 Xinglu Chen ;;; ;;; This file is part of GNU Guix. ;;; @@ -257,7 +258,7 @@ RECIPE." ((assoc-ref recipe #:commit) =3D> (lambda (commit) (cons 'commit commit))) (else - '(branch . "master")))) + '()))) =20 (let-values (((directory commit) (download-git-repository url ref))) `(origin base-commit: 9540323458de87b0b8aa421e449a4fe27af7c393 --=20 2.33.0