GNU bug report logs -
#50426
[PATCH] import: elpa: Don't hardcode default branch to 'master'.
Previous Next
Reported by: Xinglu Chen <public <at> yoctocell.xyz>
Date: Mon, 6 Sep 2021 10:58:02 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 50426 in the body.
You can then email your comments to 50426 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#50426
; Package
guix-patches
.
(Mon, 06 Sep 2021 10:58:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Xinglu Chen <public <at> yoctocell.xyz>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Mon, 06 Sep 2021 10:58:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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 ‘consult’ 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/guile/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 #<thunk 7f9dcef69f60>)
In ice-9/boot-9.scm:
724:2 14 (call-with-prompt _ _ #<procedure default-prompt-handler (k proc)>)
In ice-9/eval.scm:
619:8 13 (_ #(#(#<directory (guile-user) 7f9dcef63c80>)))
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 #<store-connection 256.99 7f9dc996c820> "https://github.com/…" …)
247:4 4 (update-cached-checkout _ #:ref _ #:recursive? _ #:check-out? _ #:starting-commit _ # _ …)
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 © 2018 Oleg Pykhalov <go.wigust <at> gmail.com>
;;; Copyright © 2020 Martin Becze <mjbecze <at> riseup.net>
;;; Copyright © 2020 Ricardo Wurmus <rekado <at> elephly.net>
+;;; Copyright © 2021 Xinglu Chen <public <at> yoctocell.xyz>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -257,7 +258,7 @@ RECIPE."
((assoc-ref recipe #:commit)
=> (lambda (commit) (cons 'commit commit)))
(else
- '(branch . "master"))))
+ '())))
(let-values (((directory commit) (download-git-repository url ref)))
`(origin
base-commit: 9540323458de87b0b8aa421e449a4fe27af7c393
--
2.33.0
Reply sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
You have taken responsibility.
(Fri, 10 Sep 2021 15:28:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Xinglu Chen <public <at> yoctocell.xyz>
:
bug acknowledged by developer.
(Fri, 10 Sep 2021 15:28:01 GMT)
Full text and
rfc822 format available.
Message #10 received at 50426-done <at> debbugs.gnu.org (full text, mbox):
Hi,
Xinglu Chen <public <at> yoctocell.xyz> skribis:
> 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.
Applied, thanks!
> For example, try to import the ‘consult’ package from MELPA:
>
> $ ./pre-inst-env guix import elpa -a melpa consult
This example works for me:
--8<---------------cut here---------------start------------->8---
$ guix describe
Generacio 189 Aug 30 2021 12:09:27 (nuna)
guix f91ae94
repository URL: https://git.savannah.gnu.org/git/guix.git
branch: master
commit: f91ae9425bb385b60396a544afe27933896b8fa3
ludo <at> ribbon ~/src/guix$ guix import elpa -a melpa consult
Starting download of /tmp/guix-file.E3Bp9a
From https://melpa.org/packages/consult-20210905.1657.tar...
…0905.1657.tar 240KiB 501KiB/s 00:00 [##################] 100.0%
(package
(name "emacs-consult")
(version "20210905.1657")
(source
(origin
(method url-fetch)
(uri (string-append
"https://melpa.org/packages/consult-"
version
".tar"))
(sha256
(base32
"0d29fd0r6bsn3ivqzjdlj7yhafbs84x3p4v7885nc14fgmbl5a7k"))))
[…]
--8<---------------cut here---------------end--------------->8---
But maybe something changed on MELPA in the meantime?
Thanks,
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#50426
; Package
guix-patches
.
(Fri, 10 Sep 2021 17:57:01 GMT)
Full text and
rfc822 format available.
Message #13 received at 50426-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Fri, Sep 10 2021, Ludovic Courtès wrote:
> Hi,
>
> Xinglu Chen <public <at> yoctocell.xyz> skribis:
>
>> 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.
>
> Applied, thanks!
>
>> For example, try to import the ‘consult’ package from MELPA:
>>
>> $ ./pre-inst-env guix import elpa -a melpa consult
>
> This example works for me:
>
> --8<---------------cut here---------------start------------->8---
> $ guix describe
> Generacio 189 Aug 30 2021 12:09:27 (nuna)
> guix f91ae94
> repository URL: https://git.savannah.gnu.org/git/guix.git
> branch: master
> commit: f91ae9425bb385b60396a544afe27933896b8fa3
> ludo <at> ribbon ~/src/guix$ guix import elpa -a melpa consult
>
> Starting download of /tmp/guix-file.E3Bp9a
> From https://melpa.org/packages/consult-20210905.1657.tar...
> …0905.1657.tar 240KiB 501KiB/s 00:00 [##################] 100.0%
> (package
> (name "emacs-consult")
> (version "20210905.1657")
> (source
> (origin
> (method url-fetch)
> (uri (string-append
> "https://melpa.org/packages/consult-"
> version
> ".tar"))
> (sha256
> (base32
> "0d29fd0r6bsn3ivqzjdlj7yhafbs84x3p4v7885nc14fgmbl5a7k"))))
> […]
> --8<---------------cut here---------------end--------------->8---
>
> But maybe something changed on MELPA in the meantime?
Ah, I think you are running into #49006[1], which uses the MELPA URL
instead of the Git repo.
[1]: <https://issues.guix.gnu.org/49006>
[signature.asc (application/pgp-signature, inline)]
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 09 Oct 2021 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 198 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.