Commit graph

496 commits

Author SHA1 Message Date
Glenn Morris
e1b3f35f93 Some documentation for signing of packages
* doc/emacs/package.texi (Package Menu, Package Installation):
Mention signed packages.

* doc/lispref/package.texi (Package Archives): Mention signing packages.

* lisp/emacs-lisp/package.el (package-check-signature)
(package-unsigned-archives): Doc fixes.

* etc/NEWS: Related edits.
2014-06-04 23:15:44 -07:00
Glenn Morris
910dc8d312 * lisp/emacs-lisp/package.el (package-pinned-packages): Doc fix.
* etc/NEWS: Related edit.
2014-06-02 21:41:20 -07:00
Glenn Morris
953e106ac8 Merge from emacs-24; up to 2014-05-29T17:16:00Z!dmantipov@yandex.ru 2014-06-01 17:18:22 -07:00
Glenn Morris
ff66db7950 Fix typo in previous 2014-05-29 22:15:29 -07:00
Glenn Morris
ab84733c35 package.el: Fix some version tags
* lisp/emacs-lisp/package.el (package-check-signature)
(package-unsigned-archives): Fix :version.
2014-05-29 22:08:10 -07:00
Thien-Thi Nguyen
c63982dd7d * lisp/emacs-lisp/package.el (package-generate-autoloads):
Inhibit backup files.
2014-05-28 11:58:47 +02:00
Glenn Morris
015936fba1 Merge from emacs-24; up to 2014-05-26T10:21:18Z!rgm@gnu.org 2014-05-25 19:28:09 -07:00
Thien-Thi Nguyen
770a6a917f Arrange to never byte-compile the generated -pkg.el file.
* lisp/emacs-lisp/package.el (package-generate-description-file):
Output first-line comment to set buffer-local var `no-byte-compile'.
Suggested by Dmitry Gutov:
<http://lists.gnu.org/archive/html/emacs-devel/2014-05/msg00401.html>.
2014-05-25 18:53:28 +02:00
Thien-Thi Nguyen
e50a0b6e9d Fix bug: Properly quote args to generated -pkg.el `define-package'.
* lisp/emacs-lisp/package.el (package-generate-description-file):
Inline `package--alist-to-plist'; rewrite to selectively
quote alist values that are not self-quoting.
(package--alist-to-plist): Delete func.
2014-05-25 18:32:08 +02:00
Dmitry Gutov
b0df8b9535 Replace uses of save-buffer' with write-region'
* lisp/emacs-lisp/package.el (package--download-one-archive): Use
`write-region' instead of `save-buffer' to avoid running various
hooks. 
(describe-package-1): Same.  Insert newline at the end of the
buffer if appropriate.

Fixes: debbugs:17155
2014-05-21 05:14:38 +03:00
Stefan Monnier
5e87fcb1d7 * lisp/emacs-lisp/package.el (package-compute-transaction): Topological sort.
Add optional `seen' argument to detect and break infinite loops.

Fixes: debbugs:16994
2014-05-06 14:11:16 -04:00
Stefan Monnier
929c0500cc * lisp/emacs-lisp/package.el (package-built-in-p): Treat a min-version of
0 like nil.
2014-03-28 18:47:46 -04:00
Juanma Barranquero
196716cf35 * lisp/emacs-lisp/package.el: Fix bug#16733 (again).
(url-http-parse-response, url-http-end-of-headers, url-recreate-url)
  (url-http-target-url): Remove unused declarations.
  (package-handle-response): Remove.
  (package--with-work-buffer): Use url-insert-file-contents and simplify.
  (package--download-one-archive): Use current-buffer instead of
  dynamic binding of `buffer'.
  (describe-package-1): Do not decode readme-string.

* lisp/url/url-handlers.el (url-http-parse-response): Add autoload.
  (url-insert-file-contents): Signal file-error in case of HTTP error.
2014-03-26 16:21:17 +01:00
Dmitry Gutov
3e2377ce2f Fix bug#16762
* lisp/emacs-lisp/package.el (package--add-to-archive-contents):
Include already installed and built-in packages in
`package-archive-contents'.
(package-install): Don't include already installed packages in the
options on interactive invocation.
2014-03-25 00:38:06 +02:00
Dmitry Gutov
2614c1af39 * lisp/emacs-lisp/package.el (package-show-package-list): If the buffer
is already displayed in another window, switch to that window.
2014-03-23 10:35:56 +02:00
Dmitry Gutov
1197f2e665 Fix bug#16873
* lisp/emacs-lisp/package.el (package-desc): Use the contents of the
quoted form, not its cdr.
2014-03-22 10:43:30 +02:00
Dmitry Gutov
dcf7866712 Fix bug#16826
* lisp/emacs-lisp/package.el (package-compute-transaction):
Use `version-list-<=' to compare the requirement version against
the package version already to be installed.  Update the error
message.
2014-03-21 08:06:52 +02:00
Juanma Barranquero
f88bdc45e0 lisp/emacs-lisp/package.el (describe-package-1): Decode commentary (bug#16733). 2014-03-19 17:14:26 +01:00
Glenn Morris
881033454a * package.el (package-menu-mode-map): Replace use of obsolete function alias.
Tweak menu item text.
2014-03-14 16:55:40 -04:00
Tom Willemse
0d71dfb381 * lisp/emacs-lisp/package.el (package--prepare-dependencies):
Accept requirements without explicit version.

Fixes: debbugs:14941
2014-03-13 09:34:01 -04:00
Glenn Morris
a215930cfe Some package doc updates
* doc/emacs/help.texi (Package Keywords): Mention describe-package buttons.

* doc/emacs/package.texi (Package Menu): Mention package-menu-filter.

* lisp/emacs-lisp/package.el (package-menu-mode-map): Tweak menu.
(package-menu-filter): Rename from package-menu-filter-interactive.
Doc fix.

* etc/NEWS: Related edits.  Copyedit.
2014-02-11 20:20:34 -05:00
Stefan Monnier
29afcbab15 * lisp/emacs-lisp/package.el: Write files silently.
(package-autoload-ensure-default-file)
(package-generate-description-file, package--write-file-no-coding)
(package-install-from-archive, package--download-one-archive):
Tell `write-region' to stay quiet.
(package-menu-mode, package-menu--print-info): Omit the Archive column
if there's only one archive.
(package-all-keywords, package--has-keyword-p): Remove dead code.
2014-01-22 14:22:45 -05:00
Glenn Morris
cc0f2ece47 Fix some function declarations
* lisp/calc/calc-embed.el (thing-at-point-looking-at):
* lisp/emacs-lisp/map-ynp.el (x-popup-dialog):
* lisp/obsolete/lmenu.el (x-popup-dialog):
* lisp/emacs-lisp/package.el (url-recreate-url):
* lisp/mail/mailclient.el (clipboard-kill-ring-save):
* lisp/subr.el (x-popup-dialog): Update declaration.

* lisp/mail/rmail.el (rmail-mime-message-p):
* lisp/window.el (tool-bar-lines-needed): Remove unnecessary declaration.
2014-01-21 20:50:40 -05:00
Dmitry Gutov
39903fd1fc Finally make package-desc--keywords work
* lisp/emacs-lisp/package.el (package-desc--keywords): Use `nth'
  instead of `cdr'.
2014-01-16 18:44:17 +02:00
Dmitry Gutov
2dbf4ffdda * lisp/emacs-lisp/package.el (package-desc--keywords): Use `cdr' with
`assoc'.  Make private.  Update all callers.
2014-01-16 14:23:14 +02:00
Dmitry Gutov
5c92e00da4 * lisp/emacs-lisp/package.el (package-desc-keywords): New function.
(describe-package-1, package-all-keywords)
(package--has-keyword-p): Use it.

Fixes: debbugs:16222
2014-01-15 06:58:06 +02:00
Bastien Guerry
2167f25d0f Fix 2014-01-08T11:19:30Z!bzg@gnu.org
* emacs-lisp/package.el (package-installed-p): Fix my previous
commit (2014-01-08T11:19:30Z!bzg@gnu.org).
2014-01-08 18:39:31 +01:00
Stefan Monnier
ec6c7de239 * lisp/emacs-lisp/package.el (package-delete): Only remove pkg-desc from
package-alist.
2014-01-08 09:19:27 -05:00
Bastien Guerry
d6262c7c39 package.el: various fixes.
* emacs-lisp/package.el (package-installed-p): First check if the
package name is in package-alist.
(package-delete): Correctly delete the package from package-alist.
2014-01-08 12:19:30 +01:00
Daiki Ueno
0a3eec3270 emacs-lisp/package.el (package--check-signature): Fix download error handling
* emacs-lisp/package.el (url-recreate-url): Declare.
(url-http-target-url): Declare.
(package-handle-response): Include requested URL in the error
message.
(package--check-signature): Don't re-signal errors from
package--with-work-buffer.  Suggested by Stefan Monnier.
2014-01-08 15:25:21 +09:00
Bastien Guerry
2b6b4f204c emacs-lisp/package.el (package-delete): Delete package completely
* emacs-lisp/package.el (package-delete): Also delete the package
name from `package-alist', not its description only.
2014-01-07 11:58:03 +01:00
Paul Eggert
ba3189039a Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
Ted Zlatanov
5ae811ddef Support filtering by keywords in package listings.
* emacs-lisp/package.el (package-built-in-p): Support both
built-in and the package.el converted package descriptions.
(package-show-package-list): Allow keywords.
(package-keyword-button-action): Use it instead of
`finder-list-matches'.
(package-menu-filter-interactive): Interactive filtering (by
keyword) function.
(package-menu--generate): Support keywords and change keymappings
and headers when they are given.
(package--has-keyword-p): Helper function.
(package-menu--refresh): Use it.
(package--mapc): Helper function.
(package-all-keywords): Use it.
(package-menu-mode-map): Set up menu items and keybindings to
provide a filtering UI.
2013-12-14 14:55:19 -05:00
Tom Willemse
f77d7d1773 * lisp/emacs-lisp/package.el (package--prepare-dependencies): New function.
(package-buffer-info): Use it.

Fixes: debbugs:15108
2013-12-14 11:02:39 -05:00
Glenn Morris
7b3f56792c * lisp/emacs-lisp/package.el (finder-list-matches): Autoload
rather than falsely declaring.
2013-12-11 16:15:12 -05:00
Ted Zlatanov
5a56578283 Remove finder.el require dependency in package.el
* emacs-lisp/package.el (package-keyword-button-action): Remove
finder.el require dependency.
2013-12-09 19:54:38 -05:00
Ted Zlatanov
a81fc7ba93 Add keyword buttons to package description.
* emacs-lisp/package.el: Require finder.el.
(describe-package-1): Add keyword buttons.
(package-make-button): New convenience function.
(package-keyword-button-action): Keyword button action using
`finder-list-matches'
2013-12-09 16:35:26 -05:00
Ted Zlatanov
86fd16b6b4 * emacs-lisp/package.el (describe-package-1): Add package archive. 2013-11-20 16:01:00 -05:00
Ted Zlatanov
7397c58760 Add Archive column to package list.
* emacs-lisp/package.el (package-menu-mode)
(package-menu--print-info, package-menu--archive-predicate): Add
Archive column to package list.
2013-11-04 11:04:09 -05:00
Bozhidar Batsov
d1c0ea6a18 * lisp/emacs-lisp/package.el (package-version-join): Recognize snapshot versions. 2013-11-02 12:55:22 +02:00
Glenn Morris
f53d3815ae * lisp/emacs-lisp/package.el (lm-homepage): Declare. 2013-10-29 23:29:51 -07:00
Stefan Monnier
7e3561eec6 * lisp/emacs-lisp/package.el (package--download-one-archive)
(describe-package-1): Don't query the user about final newline.
2013-10-29 10:48:08 -04:00
Daiki Ueno
acbadd0046 Add support for package signature checking.
* lisp/emacs-lisp/package.el (url-http-file-exists-p)
(epg-make-context, epg-context-set-home-directory)
(epg-verify-string, epg-context-result-for)
(epg-signature-status, epg-signature-to-string)
(epg-check-configuration, epg-configuration)
(epg-import-keys-from-file): Declare.
(package-check-signature): New user option.
(package-unsigned-archives): New user option.
(package-desc): Add `signed' field.
(package-load-descriptor): Set `signed' field if .signed file exists.
(package--archive-file-exists-p): New function.
(package--check-signature): New function.
(package-install-from-archive): Check package signature.
(package--download-one-archive): Check archive signature.
(package-delete): Remove .signed file.
(package-import-keyring): New command.
(package-refresh-contents): Import default keyring.
(package-desc-status): Add "unsigned" status.
(describe-package-1, package-menu--print-info)
(package-menu-mark-delete, package-menu--find-upgrades)
(package-menu--status-predicate): Support "unsigned" status.

* test/automated/data/package/signed/archive-contents:
* test/automated/data/package/signed/archive-contents.sig:
* test/automated/data/package/signed/signed-good-1.0.el:
* test/automated/data/package/signed/signed-good-1.0.el.sig:
* test/automated/data/package/signed/signed-bad-1.0.el:
* test/automated/data/package/signed/signed-bad-1.0.el.sig:
* test/automated/data/package/key.pub:
* test/automated/data/package/key.sec: New files.

* test/automated/package-test.el (package-test-update-listing)
(package-test-update-archives, package-test-describe-package):
Adjust to package.el change.
(package-test-signed): New test.
2013-10-03 16:11:27 +09:00
Stefan Monnier
abd1ae34a6 * lisp/emacs-lisp/package.el (package-desc): Simplify.
Fixes: debbugs:15495
2013-10-01 11:52:53 -04:00
Dmitry Gutov
494e898bc7 * lisp/emacs-lisp/package.el (package-buffer-info, describe-package-1):
Use :url instead of :homepage, as per
http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00622.html

* test/automated/package-test.el: Update all cases to use :url instead
of :homepage.

* test/automated/package-x-test.el
(package-x-test--single-archive-entry-1-3): Same.
2013-10-01 04:38:37 +03:00
Dmitry Gutov
056453c62e * lisp/emacs-lisp/package-x.el (package-upload-buffer-internal): Pass
`extras' slot from `package-desc' to `package-make-ac-desc'.

* lisp/emacs-lisp/package.el (package-desc-from-define): Accept
additional arguments as plist, convert it to an alist and store it
in the `extras' slot.
(package-generate-description-file): Convert extras alist back to
plist and append to the `define-package' form arguments.
(package--alist-to-plist): New function.
(package--ac-desc): Add `extras' slot.
(package--add-to-archive-contents): Check if the archive-contents
vector is long enough, and if it is, pass its `extras' slot value
to `package-desc-create'.
(package-buffer-info): Call `lm-homepage', pass the returned value
to `package-desc-from-define'.
(describe-package-1): Render the homepage button.

* test/automated/package-test.el (simple-single-desc-1-4): Remove, it
was unused.
(simple-single-desc): Expect :homepage property.
(multi-file-desc): Same.
(with-package-test): Do not save previous `default-directory'
value, let-bind the var instead.
(package-test-install-single): Expect :homepage property in the
generated pkg file.
(package-test-describe-package): Expect Homepage button.
(package-test-describe-non-installed-package)
(package-test-describe-non-installed-multi-file-package): Same.
(package-test-describe-not-installed-package): Remove, it was a
duplicate.

* test/automated/package-x-test.el
(package-x-test--single-archive-entry-1-3): Expect :homepage
property.
(package-x-test--single-archive-entry-1-4): Expect nil extras slot.

* test/automated/data/package/archive-contents: Add :homepage
properties to `simple-single' and `multi-file'.

* test/automated/data/package/simple-single-1.3.el: Add URL header.

Fixes: debbugs:13291
2013-09-29 22:41:00 +03:00
Stefan Monnier
96dbf5a8ae * lisp/emacs-lisp/package.el (package-generate-autoloads): Remove `require'
which should not be needed any more.
(package-menu-refresh, package-menu-describe-package): Use user-error.
2013-09-17 11:52:31 -04:00
Stefan Monnier
14b511d4e5 * lisp/emacs-lisp/package.el (package-activate-1): Don't let a missing
<pkg>-autoloads.el file stop us.
2013-09-03 14:21:41 -04:00
Stefan Monnier
2d69b99e59 * lisp/emacs-lisp/package.el (package-activate-1): Don't add unnecessarily
to load-path.
2013-08-28 13:57:12 -04:00
Glenn Morris
a0b5606ec7 Merge from emacs-24; up to 2013-01-03T01:56:56Z!rgm@gnu.org 2013-08-27 01:01:13 -07:00