1

I posted this question to help-gnu-emacs, but haven't had a reply there, so perhaps this is a different audience.

I have an automated test suite that downloads a few packages from ELPA to simulate a fresh install. It runs perfectly well on Linux and OSX, but not on Windows with Emacs 24.3.1. A simple way to reproduce the problem is:

\>c:\utils\emacs\bin\emacs -Q --batch -f toggle-debug-on-error --eval "(setq package-archives '((\"gnu\" . \"http://elpa.gnu.org/packages/\")))" --eval "(package-refresh-contents)"
Debug on Error enabled globally
Contacting host: elpa.gnu.org:80
Memory exhausted--use C-x s then exit and restart Emacs

I also tried using an up to date binary from http://sourceforge.net/projects/emacs-bin/ dated 9th September 2014. This fails to find gpg:

\>c:\utils\emacs-trunk\bin\emacs -Q --batch -f toggle-debug-on-error --eval "(setq package-archives '((\"gnu\" . \"http://elpa.gnu.org/packages/\")))" --eval "(package-refresh-contents)"
Debug on Error enabled globally
Contacting host: elpa.gnu.org:80
Contacting host: elpa.gnu.org:80
Debugger entered--Lisp error: (file-error "Searching for program" "no
such file or directory" "
gpg")
  start-process("epg" #<buffer  *epg*> "gpg" "--no-tty" "--status-fd"
"1" "--yes" "--homedir" "
d:/dev/rneatherway-fsharpbinding/emacs/tmp/.emacs.d/elpa/gnupg"
"--command-fd" "0" "--output" "
c:/Users/robnea/AppData/Local/Temp/epg-output3804P5-" "--verify" "--"
"c:/Users/robnea/AppData/
Local/Temp/epg-signature3804jvu" "-")
... snip ...

while using MELPA works fine:

\>c:\utils\emacs-trunk\bin\emacs
--batch -f toggle-debug-on-error --eval "(setq package-archives
'((\"melpa\" . \"http://melpa.milkbox.net/packages/\")))" --eval
"(package-refresh-contents)"
Debug on Error enabled globally
Contacting host: melpa.milkbox.net:80
Contacting host: melpa.milkbox.net:80

I'm not quite sure how to proceed debugging this, but something seems to be not quite right with the Windows build.

  • Try running the same commands interactively. I've lately had #<buffer *epg*> hanging when trying to list packages due to signature issues (and not having gpg installed I think). – Jonathan Leech-Pepin Oct 9 '14 at 14:34
  • Are you suggesting that the commands will likely also fail interactively? – rneatherway Oct 9 '14 at 14:46
  • Debugger error says "no such file or directory" "gpg" so it's likely it cannot find gpg.exe to perform signing – Jonathan Leech-Pepin Oct 9 '14 at 14:53
4

Debugger is flagging on:

Debugger entered--Lisp error: (file-error "Searching for program" "no
such file or directory" "
gpg")

You will need to confirm if gpg.exe is installed on the machine.

If it is not and you don't intend to install it, you can bypass signature checking with:

(setq package-check-signature nil)

This will skip the gpg (epg) checking and refresh directly.

Alternately you can install GPG4Win and ensure it is in your path before launching Emacs to allow checking to proceed. Although you will have to confirm interactively that it does not prompt for approval of keys that may cause it to hang/wait for input.

  • Right, I saw that it is failing to find gpg. Do you think it is the same root cause in 24.3 that is triggering memory exhaustion? – rneatherway Oct 10 '14 at 8:46
  • It's possible. If making the same change resolves that issue then they could be linked. Is there a question open about the memory exhaustion? – Jonathan Leech-Pepin Oct 10 '14 at 11:18
  • This question was intended to cover both. I can confirm that gpg.exe is no installed, and adding --eval (setq package-check-signature nil) to the arguments works nicely on Emacs 24.4-pre. However, it doesn't help with 24.3.1, the behaviour is unchanged. – rneatherway Oct 11 '14 at 14:11
  • Now that 24.4 is being released, I suppose the 24.3.1 behaviour is less important. Thanks for answering. – rneatherway Oct 14 '14 at 9:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.