Fix double package-refresh on first install
This commit is contained in:
parent
7005ae13d7
commit
a2f14183a1
2 changed files with 7 additions and 2 deletions
|
@ -9,7 +9,8 @@
|
|||
(doom-initialize)
|
||||
(when force-p
|
||||
(doom-refresh-clear-cache))
|
||||
(unless (persistent-soft-fetch 'last-pkg-refresh "emacs")
|
||||
(unless (or (persistent-soft-fetch 'last-pkg-refresh "emacs")
|
||||
doom--refresh-p)
|
||||
(condition-case ex
|
||||
(progn
|
||||
(message "Refreshing package archives")
|
||||
|
@ -25,6 +26,7 @@
|
|||
;;;###autoload
|
||||
(defun doom-refresh-clear-cache ()
|
||||
"Clear the cache for `doom-refresh-packages'."
|
||||
(setq doom--refresh-p nil)
|
||||
(persistent-soft-store 'last-pkg-refresh nil "emacs"))
|
||||
|
||||
;;;###autoload
|
||||
|
|
|
@ -74,6 +74,8 @@ missing) and shouldn't be deleted.")
|
|||
"A backup of `load-path' before it was altered by `doom-initialize'. Used as a
|
||||
base by `doom!' and for calculating how many packages exist.")
|
||||
|
||||
(defvar doom--refresh-p nil)
|
||||
|
||||
(setq load-prefer-newer noninteractive
|
||||
package--init-file-ensured t
|
||||
package-user-dir (expand-file-name "elpa" doom-packages-dir)
|
||||
|
@ -148,7 +150,8 @@ to speed up startup."
|
|||
;; Ensure core packages are installed
|
||||
(let ((core-packages (cl-remove-if #'package-installed-p doom-core-packages)))
|
||||
(when core-packages
|
||||
(package-refresh-contents)
|
||||
(package-refresh-contents t)
|
||||
(setq doom--refresh-p t)
|
||||
(dolist (pkg core-packages)
|
||||
(let ((inhibit-message t))
|
||||
(package-install pkg))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue