Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
ec6c7de2
Commit
ec6c7de2
authored
Jan 08, 2014
by
Stefan Monnier
Browse files
* lisp/emacs-lisp/package.el (package-delete): Only remove pkg-desc from
package-alist.
parent
d6262c7c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
20 deletions
+26
-20
lisp/ChangeLog
lisp/ChangeLog
+5
-0
lisp/emacs-lisp/package.el
lisp/emacs-lisp/package.el
+21
-20
No files found.
lisp/ChangeLog
View file @
ec6c7de2
2014-01-08 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/package.el (package-delete): Only remove pkg-desc from
package-alist.
2014-01-08 Bastien Guerry <bzg@gnu.org>
* emacs-lisp/package.el (package-installed-p): First check if the
...
...
lisp/emacs-lisp/package.el
View file @
ec6c7de2
...
...
@@ -818,28 +818,26 @@ It will move point to somewhere in the headers."
(
defun
package--check-signature
(
location
file
)
"Check signature of the current buffer.
GnuPG keyring is located under \"gnupg\" in `package-user-dir'."
(
let
((
context
(
epg-make-context
'OpenPGP
))
(
homedir
(
expand-file-name
"gnupg"
package-user-dir
))
(
sig-file
(
concat
file
".sig"
))
sig-content
good-signatures
)
(
setq
sig-content
(
package--with-work-buffer
location
sig-file
(
buffer-string
)))
(
let*
((
context
(
epg-make-context
'OpenPGP
))
(
homedir
(
expand-file-name
"gnupg"
package-user-dir
))
(
sig-file
(
concat
file
".sig"
))
(
sig-content
(
package--with-work-buffer
location
sig-file
(
buffer-string
))))
(
epg-context-set-home-directory
context
homedir
)
(
epg-verify-string
context
sig-content
(
buffer-string
))
;; The .sig file may contain multiple signatures. Success if one
;; of the signatures is good.
(
s
et
q
good-signatures
(
delq
nil
(
mapcar
(
lambda
(
sig
)
(
if
(
eq
(
epg-signature-status
sig
)
'good
)
sig
))
(
epg-context-result-for
context
'verify
))))
(
if
(
null
good-signatures
)
(
error
"Failed to verify signature %s: %S"
sig-file
(
mapcar
#'
epg-signature-to-string
(
epg-context-result-for
context
'verify
)))
good-signatures
)))
(
l
et
((
good-signatures
(
delq
nil
(
mapcar
(
lambda
(
sig
)
(
if
(
eq
(
epg-signature-status
sig
)
'good
)
sig
))
(
epg-context-result-for
context
'verify
))))
)
(
if
(
null
good-signatures
)
(
error
"Failed to verify signature %s: %S"
sig-file
(
mapcar
#'
epg-signature-to-string
(
epg-context-result-for
context
'verify
)))
good-signatures
)))
)
(
defun
package-install-from-archive
(
pkg-desc
)
"Download and install a tar package."
...
...
@@ -1232,8 +1230,11 @@ The file can either be a tar file or an Emacs Lisp file."
(
if
(
file-exists-p
signed-file
)
(
delete-file
signed-file
)))
;; Update package-alist.
(
let*
((
name
(
package-desc-name
pkg-desc
)))
(
setq
package-alist
(
delete
(
assq
name
package-alist
)
package-alist
)))
(
let*
((
name
(
package-desc-name
pkg-desc
))
(
pkgs
(
assq
name
package-alist
)))
(
delete
pkg-desc
pkgs
)
(
unless
(
cdr
pkgs
)
(
setq
package-alist
(
delq
pkgs
package-alist
))))
(
message
"Package `%s' deleted."
(
package-desc-full-name
pkg-desc
)))))
(
defun
package-archive-base
(
desc
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment