From 88158685246fc684986ddde57b184460e256eace Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Sat, 26 Mar 2016 00:46:11 -0400 Subject: [PATCH] core: fix lazy installation of not used packages Fixes #5591 --- core/core-configuration-layer.el | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/core/core-configuration-layer.el b/core/core-configuration-layer.el index a21e7ca35..f2bda9102 100644 --- a/core/core-configuration-layer.el +++ b/core/core-configuration-layer.el @@ -987,13 +987,20 @@ Returns non-nil if the packages have been installed." (when (dotspacemacs/add-layer layer-name) (configuration-layer/sync 'no-install)) (let* ((layer (object-assoc layer-name :name configuration-layer--layers)) - (packages (delq nil - (mapcar (lambda (x) - (object-assoc - x :name configuration-layer--packages)) - (oref layer :packages))))) - (configuration-layer//install-packages packages) - (configuration-layer//configure-packages packages) + (pkgs-to-install + (delq nil (mapcar + (lambda (x) + (object-assoc + x :name configuration-layer--used-distant-packages)) + (oref layer :packages)))) + (pkgs-to-configure + (delq nil (mapcar + (lambda (x) + (object-assoc + x :name configuration-layer--packages)) + (oref layer :packages))))) + (configuration-layer//install-packages pkgs-to-install) + (configuration-layer//configure-packages pkgs-to-configure) (oset layer :lazy-install nil)) t))