el-get/test/el-get-issue-1189.el
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

17 lines
633 B
EmacsLisp

;;; When installing a package whose name is a prefix of an already
;;; installed package, `el-get-elpa-package-directory' gets confused.
(setq el-get-sources
'((:name load-dir ; I tried to pick the smallest package
:type elpa
:description "Load all Emacs Lisp files in a given directory"
:repo ("gnu" . "http://elpa.gnu.org/packages/"))))
(el-get 'sync 'load-dir)
(assert (not (equal (el-get-elpa-package-directory 'load)
(el-get-elpa-package-directory 'load-dir)))
nil
"a package name `load' shouldn't use the same directory
as `load-dir'.")