core: rename dotspacemacs-download-packages
Rename dotspacemacs-download-packages to dotspacemacs-install-packages to better reflect the changes in the previous commit. Also change the value 'used to 'used-only (note that 'used is still supported for backward compatibility).
This commit is contained in:
parent
564cbc40ed
commit
1e64768fb7
|
@ -387,7 +387,7 @@ If NO-INSTALL is non nil then install steps are skipped."
|
||||||
(let ((pkg (configuration-layer/get-package x)))
|
(let ((pkg (configuration-layer/get-package x)))
|
||||||
(not (oref pkg :lazy-install)))))
|
(not (oref pkg :lazy-install)))))
|
||||||
;; also install all other packages if requested
|
;; also install all other packages if requested
|
||||||
(when (eq 'all dotspacemacs-download-packages)
|
(when (eq 'all dotspacemacs-install-packages)
|
||||||
(let (all-other-packages)
|
(let (all-other-packages)
|
||||||
(dolist (layer (configuration-layer/get-layers-list))
|
(dolist (layer (configuration-layer/get-layers-list))
|
||||||
(let ((configuration-layer--declared-layers-usedp nil)
|
(let ((configuration-layer--declared-layers-usedp nil)
|
||||||
|
@ -402,7 +402,8 @@ If NO-INSTALL is non nil then install steps are skipped."
|
||||||
(configuration-layer//get-distant-packages
|
(configuration-layer//get-distant-packages
|
||||||
all-other-packages nil))))))
|
all-other-packages nil))))))
|
||||||
(configuration-layer//install-packages packages)
|
(configuration-layer//install-packages packages)
|
||||||
(when (and (eq 'used dotspacemacs-download-packages)
|
(when (and (or (eq 'used dotspacemacs-install-packages)
|
||||||
|
(eq 'used-only dotspacemacs-install-packages))
|
||||||
(not configuration-layer-force-distribution)
|
(not configuration-layer-force-distribution)
|
||||||
(not configuration-layer-exclude-all-layers))
|
(not configuration-layer-exclude-all-layers))
|
||||||
(configuration-layer/delete-orphan-packages packages))))
|
(configuration-layer/delete-orphan-packages packages))))
|
||||||
|
|
|
@ -72,17 +72,16 @@ versions, set this to `emacs-version'.")
|
||||||
"List of additional paths where to look for configuration layers.
|
"List of additional paths where to look for configuration layers.
|
||||||
Paths must have a trailing slash (ie. `~/.mycontribs/')")
|
Paths must have a trailing slash (ie. `~/.mycontribs/')")
|
||||||
|
|
||||||
(defvar dotspacemacs-download-packages 'used
|
(defvar dotspacemacs-install-packages 'used-only
|
||||||
"Defines the behaviour of Spacemacs when downloading packages.
|
"Defines the behaviour of Spacemacs when installing packages.
|
||||||
Possible values are `used', `used-but-keep-unused' and `all'. `used' will
|
Possible values are `used-only', `used-but-keep-unused' and `all'. `used-only'
|
||||||
download only explicitly used packages and remove any unused packages as well as
|
installs only explicitly used packages and uninstall any unused packages as well
|
||||||
their dependencies. `used-but-keep-unused' will download only the used packages
|
as their unused dependencies. `used-but-keep-unused' installs only the used
|
||||||
but won't delete them if they become unused. `all' will download all the
|
packages but won't uninstall them if they become unused. `all' installs *all*
|
||||||
packages regardless if they are used or not and packages won't be deleted by
|
packages supported by Spacemacs and never uninstall them.")
|
||||||
Spacemacs.")
|
|
||||||
|
|
||||||
(defvar dotspacemacs-enable-lazy-installation 'unused
|
(defvar dotspacemacs-enable-lazy-installation 'unused
|
||||||
" Lazy installation of layers (i.e. layers are installed only when a file
|
"Lazy installation of layers (i.e. layers are installed only when a file
|
||||||
with a supported type is opened). Possible values are `all', `unused' and `nil'.
|
with a supported type is opened). Possible values are `all', `unused' and `nil'.
|
||||||
`unused' will lazy install only unused layers (i.e. layers not listed in
|
`unused' will lazy install only unused layers (i.e. layers not listed in
|
||||||
variable `dotspacemacs-configuration-layers'), `all' will lazy install any layer
|
variable `dotspacemacs-configuration-layers'), `all' will lazy install any layer
|
||||||
|
@ -549,7 +548,7 @@ error recovery."
|
||||||
(defadvice dotspacemacs/layers
|
(defadvice dotspacemacs/layers
|
||||||
(after error-recover-preserve-packages activate)
|
(after error-recover-preserve-packages activate)
|
||||||
(progn
|
(progn
|
||||||
(setq-default dotspacemacs-download-packages 'used-but-keep-unused)
|
(setq-default dotspacemacs-install-packages 'used-but-keep-unused)
|
||||||
(ad-disable-advice 'dotspacemacs/layers 'after
|
(ad-disable-advice 'dotspacemacs/layers 'after
|
||||||
'error-recover-preserve-packages)
|
'error-recover-preserve-packages)
|
||||||
(ad-activate 'dotspacemacs/layers)))
|
(ad-activate 'dotspacemacs/layers)))
|
||||||
|
@ -583,7 +582,7 @@ error recovery."
|
||||||
;; protect global values of these variables
|
;; protect global values of these variables
|
||||||
(let (dotspacemacs-configuration-layer-path dotspacemacs-configuration-layers
|
(let (dotspacemacs-configuration-layer-path dotspacemacs-configuration-layers
|
||||||
dotspacemacs-additional-packages dotspacemacs-excluded-packages
|
dotspacemacs-additional-packages dotspacemacs-excluded-packages
|
||||||
dotspacemacs-download-packages
|
dotspacemacs-install-packages
|
||||||
(passed-tests 0) (total-tests 0))
|
(passed-tests 0) (total-tests 0))
|
||||||
(load dotspacemacs-filepath)
|
(load dotspacemacs-filepath)
|
||||||
(dotspacemacs/layers)
|
(dotspacemacs/layers)
|
||||||
|
|
|
@ -59,14 +59,14 @@ values."
|
||||||
dotspacemacs-frozen-packages '()
|
dotspacemacs-frozen-packages '()
|
||||||
;; A list of packages that will not be installed and loaded.
|
;; A list of packages that will not be installed and loaded.
|
||||||
dotspacemacs-excluded-packages '()
|
dotspacemacs-excluded-packages '()
|
||||||
;; Defines the behaviour of Spacemacs when downloading packages.
|
;; Defines the behaviour of Spacemacs when installing packages.
|
||||||
;; Possible values are `used', `used-but-keep-unused' and `all'. `used' will
|
;; Possible values are `used-only', `used-but-keep-unused' and `all'.
|
||||||
;; download only explicitly used packages and remove any unused packages as
|
;; `used-only' installs only explicitly used packages and uninstall any
|
||||||
;; well as their dependencies. `used-but-keep-unused' will download only the
|
;; unused packages as well as their unused dependencies.
|
||||||
;; used packages but won't delete them if they become unused. `all' will
|
;; `used-but-keep-unused' installs only the used packages but won't uninstall
|
||||||
;; download all the packages regardless if they are used or not and packages
|
;; them if they become unused. `all' installs *all* packages supported by
|
||||||
;; won't be deleted by Spacemacs. (default is `used')
|
;; Spacemacs and never uninstall them. (default is `used-only')
|
||||||
dotspacemacs-download-packages 'used))
|
dotspacemacs-install-packages 'used-only))
|
||||||
|
|
||||||
(defun dotspacemacs/init ()
|
(defun dotspacemacs/init ()
|
||||||
"Initialization function.
|
"Initialization function.
|
||||||
|
|
|
@ -66,7 +66,7 @@ To install packages that does not belong to any Spacemacs layers, you can:
|
||||||
- use the variable =dotspacemacs-additonal-packages=.
|
- use the variable =dotspacemacs-additonal-packages=.
|
||||||
- or create a configuration layer configuring the package and add this layer to
|
- or create a configuration layer configuring the package and add this layer to
|
||||||
=dotspacemacs-configuration-layers=
|
=dotspacemacs-configuration-layers=
|
||||||
- or set the variable =dotspacemacs-download-packages= to =used-but-keep-unused=
|
- or set the variable =dotspacemacs-install-packages= to =used-but-keep-unused=
|
||||||
which will prevent Spacemacs from removing the packages you installed
|
which will prevent Spacemacs from removing the packages you installed
|
||||||
manually.
|
manually.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue