Subject: bug#32004: 25.2; Package-install-package Failed to verify signature file-error Setting current directory No such file or directory

From: Lars Ingebrigtsen <[email-masked]>
Date: Sat, 13 Jul 2019 05:33:03 +0200

Mike Dupont <[email-masked]> writes:

> I tried to open an url and forgot how, then decided to install w3
> but the install failed because I opened a bogus file.
>
> step 1.
> C-x-f http://json-schema.org/draft-07/schema
>
> 1.0 Shows :
> Find file: {http:/} /json-schema.org/draft-07/schema
>
> 1.1 RET
>
> this creates a buffer in the non existing directory
>
> /json-schema.org/draft-07/
>
> step 2.
>
> 2.1 M-x package-list-packages

The backtrace is variations on this:

Debugger entered--Lisp error: (file-missing "Setting curren
  make-process(:name "epg" :buffer #<buffer  *epg*-726832> 
  epg--start(#s(epg-context :protocol OpenPGP :program "/us
  epg-start-import-keys(#s(epg-context :protocol OpenPGP :p
  epg--import-keys-1(#s(epg-context :protocol OpenPGP :prog
  epg-import-keys-from-file(#s(epg-context :protocol OpenPG
  package-import-keyring("/home/larsi/src/emacs/trunk/etc/p
  package-refresh-contents(t)
  package-menu-refresh()
  package-list-packages(nil)
  funcall-interactively(package-list-packages nil)
  call-interactively(package-list-packages record nil)
  command-execute(package-list-packages record)
  execute-extended-command(nil "package-list-packages" nil)
  funcall-interactively(execute-extended-command nil "package-list-packages" nil)
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command)

Is there a standard thing we can use in these circumstances where it
doesn't much matter what default-directory is, other than that it has to
exist?  (And probably has to be readable.)

A `with-ensured-directory' or something might be nice?  Or do we just
bind default-directory to "/"?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no