Message ID | 7a5a35f29121ebbb2e1ec1fe991159fbf6bae2e4.1630925679.git.public@yoctocell.xyz |
---|---|
State | Accepted |
Headers | show |
Series | [bug#50426] import: elpa: Don't hardcode default branch to 'master'. | expand |
Context | Check | Description |
---|---|---|
cbaines/applying patch | fail | View Laminar job |
cbaines/issue | success | View issue |
Hi, Xinglu Chen <public@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@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’.
On Fri, Sep 10 2021, Ludovic Courtès wrote: > Hi, > > Xinglu Chen <public@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@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>
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@gmail.com> ;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net> ;;; Copyright © 2020 Ricardo Wurmus <rekado@elephly.net> +;;; Copyright © 2021 Xinglu Chen <public@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