From f290565098e0abbd5b3418f4e437d389f7e1140b Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Sun, 12 Nov 2017 09:33:58 -0500 Subject: [PATCH] core: new dotfile variable dotspacemacs-use-spacelpa If non-nil then Spacelpa repository is the primary source to install a locked version of packages. If nil then Spacemacs will install the lastest version of packages from MELPA. (default nil) The default value will be true when we bust all the major bugs. --- core/core-configuration-layer.el | 10 ++++++++++ core/core-dotspacemacs.el | 5 +++++ core/templates/.spacemacs.template | 4 ++++ 3 files changed, 19 insertions(+) diff --git a/core/core-configuration-layer.el b/core/core-configuration-layer.el index eadae76ba..5815adf7f 100644 --- a/core/core-configuration-layer.el +++ b/core/core-configuration-layer.el @@ -412,6 +412,16 @@ cache folder.") (defun configuration-layer/initialize () "Initialize `package.el'." + (unless dotspacemacs-use-spacelpa + ;; cleanly remove usage of stable elpa + (setq configuration-layer-elpa-archives + (cl-delete configuration-layer-stable-elpa-name + configuration-layer-elpa-archives + :test 'equal :key 'car)) + (setq package-archive-priorities + (cl-delete configuration-layer-stable-elpa-name + package-archive-priorities + :test 'equal :key 'car))) (setq configuration-layer--refresh-package-timeout dotspacemacs-elpa-timeout) (unless package--initialized (setq configuration-layer-rollback-directory diff --git a/core/core-dotspacemacs.el b/core/core-dotspacemacs.el index d7ae2387b..7cbaf9395 100644 --- a/core/core-dotspacemacs.el +++ b/core/core-dotspacemacs.el @@ -63,6 +63,11 @@ environment, otherwise it is strongly recommended to let it set to t.") (defvar dotspacemacs-elpa-timeout 5 "Maximum allowed time in seconds to contact an ELPA repository.") +(defvar dotspacemacs-use-spacelpa nil + "If non-nil then Spacelpa repository is the primary source to install +a locked version of packages. If nil then Spacemacs will install the lastest +version of packages from MELPA.") + (defvar dotspacemacs-verify-spacelpa-archives nil "If non-nil then verify the signature for downloaded Spacelpa archives.") diff --git a/core/templates/.spacemacs.template b/core/templates/.spacemacs.template index 1450b70d2..0d1ed4a00 100644 --- a/core/templates/.spacemacs.template +++ b/core/templates/.spacemacs.template @@ -86,6 +86,10 @@ It should only modify the values of Spacemacs settings." ;; Maximum allowed time in seconds to contact an ELPA repository. ;; (default 5) dotspacemacs-elpa-timeout 5 + ;; If non-nil then Spacelpa repository is the primary source to install + ;; a locked version of packages. If nil then Spacemacs will install the lastest + ;; version of packages from MELPA. (default nil) + dotspacemacs-use-spacelpa nil ;; If non-nil then verify the signature for downloaded Spacelpa archives. ;; (default nil) dotspacemacs-verify-spacelpa-archives nil