From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 06 07:08:59 2021 Received: (at 49006) by debbugs.gnu.org; 6 Sep 2021 11:08:59 +0000 Received: from localhost ([127.0.0.1]:52147 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNCUl-0007uX-FV for submit@debbugs.gnu.org; Mon, 06 Sep 2021 07:08:59 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:36410 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNCUj-0007uI-QR for 49006@debbugs.gnu.org; Mon, 06 Sep 2021 07:08:58 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1630926530; bh=O/ArN9kALLqnUQozFmXxNs4IZdJsl+rkOcoK1rs12sU=; h=From:To:Subject:In-Reply-To:References:Date; b=PpEcaEXiwYnR4C6KLndWXg/vqFGivCpXlQhHQWqJN/X3VC9tgP3CqTD256QG+aL/B Ggr7qWDITCTBcLsYwoIPKhGeFRj16iEBETRUWK2njc3EImqsjBUBXt3UYHvCIks6l+ NOARqxqSCUviEdeue7b4Hgs5URgzYJ4z6GhZdu5s= To: 49006@debbugs.gnu.org Subject: Re: MELPA importer uses the wrong source when called from CLI In-Reply-To: <87czsp8wic.fsf@yoctocell.xyz> References: <87fsxl91oh.fsf@yoctocell.xyz> <87czsp8wic.fsf@yoctocell.xyz> Date: Mon, 06 Sep 2021 13:08:49 +0200 Message-ID: <87fsui2c72.fsf@yoctocell.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Sun, Jun 13 2021, Xinglu Chen wrote: > Okay, so new findings: > > When the (guix import elpa) module has been compiled, the generated > package definition uses ‘url-fetch’ to fetch the source. > > --8 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Sun, Jun 13 2021, Xinglu Chen wrote: > Okay, so new findings: > > When the (guix import elpa) module has been compiled, the generated > package definition uses ‘url-fetch’ to fetch the source. > > --8 Okay, so new findings: > > When the (guix import elpa) module has been compiled, the generated > package definition uses =E2=80=98url-fetch=E2=80=99 to fetch the source. > > --8<---------------cut here---------------start------------->8--- > ~/src/guix [env]$ ./pre-inst-env guix import elpa -a melpa magit > > Starting download of /tmp/guix-file.US750W > From https://melpa.org/packages/magit-20210609.2000.tar... > =E2=80=A6609.2000.tar 1.7MiB 365KiB/s 00:05 [###########= #######] 100.0% > (package > (name "emacs-magit") > (version "20210609.2000") > (source > (origin > (method url-fetch) > (uri (string-append > "https://melpa.org/packages/magit-" > version > ".tar")) > (sha256 > (base32 > "0pplizxy20i3i9zqm5kfjz4la93gpz8wwh1ybwdwngv5ks7vhdsr")))) > (build-system emacs-build-system) > (propagated-inputs > `(("emacs-dash" ,emacs-dash) > ("emacs-git-commit" ,emacs-git-commit) > ("emacs-magit-section" ,emacs-magit-section) > ("emacs-transient" ,emacs-transient) > ("emacs-with-editor" ,emacs-with-editor))) > (home-page "https://github.com/magit/magit") > (synopsis "A Git porcelain inside Emacs.") > (description > "Magit is a text-based Git user interface that puts an unmatched focus > on streamlining workflows. Commands are invoked using short mnemonic > key sequences that take the cursor=E2=80=99s position in the highly actio= nable > interface into account to provide context-sensitive behavior. > > With Magit you can do nearly everything that you can do when using Git > on the command-line, but at greater speed and while taking advantage > of advanced features that previously seemed too daunting to use on a > daily basis. Many users will find that by using Magit they can become > more effective Git user. > ") > (license #f)) > --8<---------------cut here---------------end--------------->8--- > > However, if the (guix import elpa) module hasn=E2=80=99t been compiled, s= ay I > just add a dummy comment to it, then the generated package definition > uses =E2=80=98git-fetch=E2=80=99 instead of =E2=80=98url-fetch=E2=80=99. = Notice the messages emitted by > Guile. > > --8<---------------cut here---------------start------------->8--- > ~/src/guix [env]$ ./pre-inst-env guix import elpa -a melpa magit > ;;; 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/gu= ile/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/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/.config/guix/current/lib/gu= ile/3.0/site-ccache/guix/import/elpa.go > ;;; note: source file /home/yoctocell/src/guix/guix/import/elpa.scm > ;;; newer than compiled guix/import/elpa.go > ;;; note: source file /home/yoctocell/src/guix/guix/import/elpa.scm > ;;; newer than compiled /home/yoctocell/.cache/guile/ccache/3.0-LE-= 8-4.5/home/yoctocell/src/guix/guix/import/elpa.scm.go > (package > (name "emacs-magit") > (version "20210609.2000") > (source > (origin > (method git-fetch) > (uri (git-reference > (url "https://github.com/magit/magit.git") > (commit > "71f57c5582448be81b02ba53750dd2ea39ed0eaf"))) > (sha256 > (base32 > "16ip50a46nk6xxj8qkpf6rmp28zjc1bhyjj9bfgibim8ywj87dlq")))) > (build-system emacs-build-system) > (propagated-inputs > `(("emacs-dash" ,emacs-dash) > ("emacs-git-commit" ,emacs-git-commit) > ("emacs-magit-section" ,emacs-magit-section) > ("emacs-transient" ,emacs-transient) > ("emacs-with-editor" ,emacs-with-editor))) > (arguments > '(#:include > '("^lisp/magit$" > "^lisp/magit[^/]+.el$" > "^lisp/git-rebase.el$" > "^Documentation/magit.texi$" > "^Documentation/AUTHORS.md$" > "^LICENSE$") > #:exclude > '("^lisp/magit-libgit.el$" > "^lisp/magit-section.el$"))) > (home-page "https://github.com/magit/magit") > (synopsis "A Git porcelain inside Emacs.") > (description > "Magit is a text-based Git user interface that puts an unmatched focus > on streamlining workflows. Commands are invoked using short mnemonic > key sequences that take the cursor=E2=80=99s position in the highly actio= nable > interface into account to provide context-sensitive behavior. > > With Magit you can do nearly everything that you can do when using Git > on the command-line, but at greater speed and while taking advantage > of advanced features that previously seemed too daunting to use on a > daily basis. Many users will find that by using Magit they can become > more effective Git user. > ") > (license #f)) > --8<---------------cut here---------------end--------------->8--- > > Maybe there is some problem with Guile itself? I came up with a hack to fix the issue, see the diff below diff --git a/guix/import/elpa.scm b/guix/import/elpa.scm index c0dc5acf51..0d07b4b35e 100644 --- a/guix/import/elpa.scm +++ b/guix/import/elpa.scm @@ -335,7 +335,8 @@ the package named PACKAGE-NAME." type ''." =20=20=20 (define melpa-recipe - (if (eq? repo 'melpa) + ;; XXX: Otherwise (eq? repo 'melpa) always seems to return #f. + (if (force (delay (eq? repo 'melpa))) (package-name->melpa-recipe (elpa-package-name pkg)) #f)) =20=20=20 I am not sure if this is a good workaround, though. Any thoughts? --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmE19sEVHHB1YmxpY0B5 b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x55aEP/RAOmMLSPEVQC1xkWgy42VWhRJoj vGXamThwtMXYf6ugtZjKp1cRzf+Hg6zGHjNheSgzA1NNi+cga0n+coKlzeMPKiTM IvZLrJPXQMK5w/fCPEguLS+GRQlXF0hmFvgKS8LxaYxSBvMHexmqxLvSmR9iiaLq xHdK3mxVu3NtLsbasVZ3MZzmhKuQPEXgqT0OMgaS8BfNlrB359bLBE/k9X8pS2Hc Io/DZ1HD2AQdxSPOTYar9Og8W+5+lwak/eKwGumZ3obu8H7iwGpVgGDbb7WAL9FC wzt6ZDyfsdHscKdSPONCQLHHtdUDx3vYTQP+23/FvkTDLG0KYJCb7kaB+nbBdv0a T3OQajFtIw+BjKYZI5Wbb426wp6jA9iYD0135hVbkuyt41MhsFZBW9hQ3B48ndBH 3UPE5RPKzuVuIzKqqmR5/K5caRxjCQPlzFLAaHfGlS6SqD4QWIPCKs/763rFP6iJ bSNXmQpeCV9NzF68wehmiYL3l07CjQkmwlTGr637rwaLWgT1Gi0dJUDvWCLDbe2S /io018jIr2P+HUy65jHL2ap/zAQdZLbU88CHSBbmtdWvFQJJVjpO9gavDpv7LSO+ dxotTp0QzvHp+RFX1ALr9Osx20/IkCATcbNIA36cRW/3uop46sEJtjMi8PUf2Zqi 9Bp/qhv8qt2sR60F =cWy2 -----END PGP SIGNATURE----- --=-=-=--