diff options
author | Matthew Feinberg <ketbra@users.noreply.github.com> | 2016-07-21 08:38:30 -0400 |
---|---|---|
committer | Matthew Feinberg <ketbra@users.noreply.github.com> | 2016-07-21 08:38:30 -0400 |
commit | 5053f75e0080b1e56d2e8a913f1621e48d684a0d (patch) | |
tree | 5820f7e1f320d0c343db53ccdb0de65b1267a0b4 /lisp/use-package | |
parent | 811c99da52654d0605242814f812e44ef51835ad (diff) | |
download | emacs-5053f75e0080b1e56d2e8a913f1621e48d684a0d.tar.gz emacs-5053f75e0080b1e56d2e8a913f1621e48d684a0d.tar.bz2 emacs-5053f75e0080b1e56d2e8a913f1621e48d684a0d.zip |
Make pin and ensure compatible
`:pin` does not work with `:ensure`, because it doesn't add the package to package-pinned-packages until after reading the package archive contents. This change causes the package archive contents to be reread if the package is pinned and `:ensure` is being used.
Copyright-paperwork-exempt: yes
Diffstat (limited to 'lisp/use-package')
-rw-r--r-- | lisp/use-package/use-package.el | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/use-package/use-package.el b/lisp/use-package/use-package.el index f81b64a02c7..92c35a42950 100644 --- a/lisp/use-package/use-package.el +++ b/lisp/use-package/use-package.el @@ -500,6 +500,8 @@ manually updated package." (defun use-package-ensure-elpa (package &optional no-refresh) (if (package-installed-p package) t + (if (and (not no-refresh) (assoc package package-pinned-packages)) + (package-read-all-archive-contents)) (if (or (assoc package package-archive-contents) no-refresh) (package-install package) (progn |