Commit Graph

63 Commits

Author SHA1 Message Date
Saulius Grigaliunas
8eaacdf899 Fix melpa host name
Now lives at melpa.org
2014-10-23 21:33:08 +03:00
Noam Postavsky
8ccda8a6fd Do use elpa deps if there are no el-get :depends
* methods/el-get-elpa.el (el-get-elpa-install-1-package): rename to
el-get-elpa-install-package, take another argument have-deps-p. Only
call package-download-transaction directly if have-deps-p.
(el-get-elpa-install, el-get-elpa-update): el-get-elpa-install{-1
=>}-package name change and new arg.
2014-10-18 12:27:27 -04:00
Noam Postavsky
85a0ad62c8 Fix call to package-download-transaction on 24.4
* methods/el-get-elpa.el (el-get-elpa-install-1-package): new wrapping
  function for package-download-transaction.
  (el-get-elpa-install, el-get-elpa-update): use it.
2014-10-16 01:07:29 -04:00
Noam Postavsky
1f7e915416 Don't let elpa download dependencies
Since el-get also downloads dependencies we end up installing things
twice.

* methods/el-get-elpa.el (el-get-elpa-install): call
  package-download-transaction instead of package-install.
2014-10-07 20:18:27 -04:00
Noam Postavsky
6aafc8a851 elpa-symlink: Use make-symbolic-link
instead of shell-command which is sensitive to the user's choice of
shell.

* el-get-elpa.el (el-get-elpa-symlink-package): use make-symbolic-link
instead of shell-command "ln -s %s %s".
2014-10-04 21:07:35 -04:00
Phil Hagelberg
acdcb6e5b2
Don't install insecurely without el-get-allow-insecure.
In most cases, we assume any connection is insecure unless the URL
starts with "https://", "$USERNAME@", or "ssh". There are a few
exceptions: I'm assuming all Emacswiki packages are insecure, and I
don't think we can know whether packages installed via Google Go are
secure or not.
2014-08-12 11:42:08 -07:00
Noam Postavsky
970b927cbe el-get-elpa-package-directory: use catch-throw.
* methods/el-get-elpa.el (el-get-elpa-package-directory): use
  catch-throw instead of setting helper variable to achieve early loop
  exit.
2014-05-28 17:55:07 -04:00
Noam Postavsky
421f085dfc elpa: refactor compat layer
* methods/el-get-elpa.el
  (package-desc-summary, package-desc-version):
  make aliases to the new 24.4 names.
  (el-get-elpa-delete-package, el-get-elpa-descs): new wrapper functions
  to simulate 24.4 behaviour in 24.3 and below.
  (el-get-elpa-build-local-recipes, el-get-elpa-post-remove,
  el-get-elpa-update-available-p): use the new wrappers/aliases.
2014-05-28 17:55:07 -04:00
Rüdiger Sonderfeld
13b9b8afc8 elpa: Use `package-delete' to remove packages.
In 24.4, simply removing the package directory is no longer enough. This
will only set the package status to `deleted' but package.el will still
think the package is installed and refuse a re-install. Calling
`package-delete' will ensure the right thing is done.

In 24.3 `package-delete' does only remove the directory so we stick with
that, but loading dired is no longer necessary since emacs 23.2 when
`delete-directory' got the optional RECURSIVE parameter.

* methods/el-get-elpa.el (el-get-elpa-post-remove): Call
  `package-delete' to remove packages.
2014-05-28 17:55:07 -04:00
Rüdiger Sonderfeld
bdc2df6ea3 elpa: Gracefully error when symlink fails.
This can happen if the package directory is simply deleted but it is
still in the `package-list' and the user tries to re-install the
package.  It is an error but without the patch the error is caused in
`file-relative-name'.

* methods/el-get-elpa.el (el-get-elpa-symlink-package): Gracefully error
  if no directory is found.
2014-05-28 17:55:06 -04:00
Rüdiger Sonderfeld
468029105d elpa: Scan all package directories.
This also checks if they exist.  Which might even be a problem for
`package-user-dir' on its own for a fresh GNU Emacs install.

* methods/el-get-elpa.el (el-get-elpa-package-directory): Scan all
  package directories and make sure they exist.
2014-05-28 17:55:06 -04:00
Noam Postavsky
a5d5d61f78 missed argument to el-get-elpa-package-directory 2014-04-09 22:52:42 -04:00
Noam Postavsky
e8681422c6 Merge pull request #1660 from npostavs/package-24.4
handle Emacs 24.4 package.el
2014-04-09 22:22:38 -04:00
Noam Postavsky
1acbc61012 fix whitespace, comment typo 2014-04-09 21:23:12 -04:00
Rafael Ibraim
b5a2ee68e2 Fixed 'symlink bug' on installation of elpa packages in Windows
Conflicts:
	methods/el-get-elpa.el
2014-04-09 18:34:35 +09:00
Noam Postavsky
4c58f55920 fix more compilation warnings, missing functions
some functions were changed or introduced in 24.3
2014-04-06 14:53:59 -04:00
Noam Postavsky
71423ff5e5 check all available package descs for new version
The available packages in package-archive-contents are not guaranteed to
be sorted by version.
2014-04-06 14:52:47 -04:00
Noam Postavsky
59c75ce9d6 handle Emacs 24.4 package.el
Packages now have a list of package descriptors
package-desc-doc has been renamed to package-desc-summary
2014-04-06 14:49:23 -04:00
Noam Postavsky
bc9fea670e satisfy newer 24.4 byte compiler
It knows argument to eval-after-load is code, and that #' implies
existence of a function.

Some of the package.el functions have changed, but that will be dealt
with separately.
2014-04-04 19:13:27 -04:00
Noam Postavsky
5f689e1ec6 fix byte compiler warnings in methods/
Add requires or declare-functions as needed. Added some missing
variables (probably worked previously by dynamic binding).
2014-03-22 19:29:34 -04:00
Ankit Shankar
863ff3d818 Fix error message for ELPA package install
The `archive` symbol isn't defined, use car and cdr of elpa-new-repo
instead.
2014-03-20 23:25:21 -04:00
Noam Postavsky
e34fe97227 avoid many package-refresh-contents via let-bind
Previous flet hack is not needed since package-refresh-contents calls
are performed by code that is under our control, namely
el-get-elpa-update.
2014-03-18 21:23:13 -04:00
Takafumi Arakaki
533075700e Comment why checking available-package 2014-03-16 15:25:58 +01:00
Takafumi Arakaki
5a9923a229 Call package-initialize in el-get-elpa-update
Otherwise, `package-alist` is nil when `el-get-elpa-update-available-p`
is called, which yield another "Wrong type argument: arrayp, nil" error.
2014-03-16 15:21:00 +01:00
Takafumi Arakaki
eb20994a7e Fix el-get-elpa-update-available-p for Emacs >24.3 2014-03-16 15:11:29 +01:00
Ryan C. Thompson
fdaaf51570 Cleanup indentation with custom indent rules 2014-03-01 16:19:46 -08:00
Ryan C. Thompson
cf34f9aa0a Clean up whitespace
This commit is the result of running cleanup-whitespace.sh.

Fixes #549.
2014-02-21 10:52:48 -08:00
myeffort
67830e2a59 Fixed some mistakes from previous commit.
In particular I neglected the fact that I've introduced a conditional
which blocked package-refresh-contents from el-get-elpa-install in some
cases. Practically the smae bug which I attempted to fix, could have
been encountered if packages were installing in opposite order, whcich i
try to reflect in added variant of the test.
2014-02-12 06:08:09 +04:00
myeffort
6294b849df Condition in elpa install with refresh package
Added a check for new `package-archives' entries to fetch/update their
archive-contents and regenerate for new configuration of
`package-archives'.
2014-02-11 21:45:11 +04:00
Noam Postavsky
5958f81dea convert elpa emacs dep to :minimum-emacs-version
Instead of producing bogus dependency on `emacs' package,
el-get-elpa-build-local-recipes should add a :minimum-emacs-version
clause instead.
2013-12-14 12:08:53 -05:00
Ryan C. Thompson
99cb036bad Fix #1454 by requiring package.el eagerly
Just adding "(require 'package)" to "el-get-elpa-package-directory"
fixes this bug, because by the time any elpa package is being installed
or fetched, package.el has to be available, so all we have to do is load
it if it hasn't already been loaded.
2013-11-22 08:39:58 -08:00
Noam Postavsky
32ab64f47e be more precise about elpa package dir names
ELPA Package directories are named <package>-<version>.  Previously
`el-get-elpa-package-directory' looked for package-dirs using
`all-completions' meaning anything starting with <package> would match.
This is problematic if a package is a prefix of another package, eg the
`s' and `solarized-theme' packages.

Instead of doing that, look for a directory that is precisely
<package>-<version> where <version> is something acceptable to
`version-to-list'.

Fixes #1189.
2013-10-07 00:20:16 -04:00
Noam Postavsky
dd18802af9 call package-initialize in elpa installion
The package-install function calls some initalization functions from
within the interactive form.  This can cause it to fail when called
non-interactively.

package-refresh-contents calls package-read-all-archive-contents so we
don't need to call it explicitly.

Fixes #1389
2013-09-29 16:22:59 -04:00
ryjm
19e03dd97a Fix el-get-elpa-package-directory returning a non-existing directory.
el-get-elpa-package-directory will not always return a real directory,
since two directories might have the same prefix (for example, erc
installs as `erc-5.3` but has a package name of `erc`. So
`try-completion` will return `erc-` if you have something
like `erc-image` installed.)

`all-completions` will return a list of actual directories which
satisfy the completion, and the `car` of this list will be the package
we want. `when realnames` will return `nil` when there are no possible
completions.
2013-07-24 11:46:45 -04:00
Dimitri Fontaine
df50585181 Merge pull request #1300 from ruediger/elpa24_4
Fix elpa support for Emacs 24.4
2013-07-21 16:28:10 -07:00
Rüdiger Sonderfeld
0aaf7db4ea Minor fix: sprintf' replaced by format'.
(elisp is not C ;-)

Signed-off-by: Rüdiger Sonderfeld <ruediger@c-plusplus.de>
2013-07-19 15:40:38 +02:00
Rüdiger Sonderfeld
3b80a0db09 Fix elpa support for Emacs 24.4.
`package-desc-vers' is obsolete (replaced by `package-desc-version')
and `package-alist' has a different layout.

el-get-elpa also calls `el-get-rmdir' in some cases with
post-remove-fun as nil.

* methods/el-get-elpa.el (el-get-elpa-update-available-p): Use
  `package-desc-version' if available.
* el-get-core.el (el-get-rmdir): Only call post-remove-fun if non-nil.

Signed-off-by: Rüdiger Sonderfeld <ruediger@c-plusplus.de>
2013-07-19 15:37:50 +02:00
Rüdiger Sonderfeld
529623d8db Add guess-website function for ELPA method.
It supports GNU ELPA, Marmalade and MELPA.

Signed-off-by: Rüdiger Sonderfeld <ruediger@c-plusplus.de>
2013-07-08 20:22:32 +02:00
Dimitri Fontaine
c8468d11d8 Fix formating of el-get-elpa-build-local-recipes function. 2013-04-20 14:47:33 +02:00
Arthur Tu
dc44097a91 Add depends and repo information to auto-generated elpa recipes 2013-04-12 16:12:37 +08:00
Victor Deryagin
0a202ea35d changed mentions of 'README.asciidoc' to 'README.md' in source files 2013-04-01 15:46:34 +03:00
Stephan Baumeister
1519fec645 Fix resolution of elpa package directory
Use 'dir' command on Windows where 'ls' is not available.
2012-08-01 20:19:01 +02:00
Ryan C. Thompson
bd418720b5 Add :auto-generated property to auto-generated recipes
Currently this has no function other than documentation, but it could
be given a function later, such as allowing manually-written recipes
to take precedence over auto-generated ones.
2012-06-03 08:45:44 -07:00
Ryan C. Thompson
a1e3054b74 Ensure el-get doesn't check for update on uninstalled package 2012-05-13 16:14:14 -07:00
Ryan C. Thompson
7a81d5b1a6 Fix elpa-update-available-p
It was not properly retrieving the installed/available versions.
2012-05-13 16:11:58 -07:00
Ryan C. Thompson
9479b9a157 Revert "Better implementation for el-get-elpa-package-directory"
This reverts commit e10d6dd3e0.
2012-05-13 11:59:06 -07:00
Ryan C. Thompson
bee3809e52 Create directories recursively in elpa-build-local-recipes
Typically this would not be necessary if el-get was installed
according to the instructions, but for testing el-get is not
installed, so the directory's parents do not already exist and need to
be created.
2012-05-13 11:59:06 -07:00
Alan Pearce
ed1813bea5 Fix typo in function name 2012-05-07 22:56:26 +01:00
Ryan C. Thompson
a659491db2 Add missing paren
Fixes #738.
2012-05-06 11:00:53 -07:00
Ryan C. Thompson
03f95b8ef2 Don't try to update an ELPA package unless an update is available
This fixes a bug where trying to update an ELPA package when an update
wasn't available would throw an error.
2012-03-13 10:45:20 -07:00