Fixes #182 Pre-extensions var are required by default

Pre and Post extensions lists are now optional.
This commit is contained in:
syl20bnr 2014-11-30 12:00:53 -05:00
parent 88cf604396
commit 20fecf2984

View file

@ -170,7 +170,7 @@ declared at the layer level."
(load file))))))) (load file)))))))
(defsubst config-system//add-layer-to-hash (pkg layer hash) (defsubst config-system//add-layer-to-hash (pkg layer hash)
"Add LAYER to the list which the value stored in HASH with key PKG." "Add LAYER to the list value stored in HASH with key PKG."
(let ((list (ht-get hash pkg))) (let ((list (ht-get hash pkg)))
(puthash pkg (add-to-list 'list layer t) hash))) (puthash pkg (add-to-list 'list layer t) hash)))
@ -210,20 +210,25 @@ config-system-all-post-extensions "
(load pkg-file) (load pkg-file)
(dolist (pkg (eval (intern (format "%s-packages" (symbol-name sym))))) (dolist (pkg (eval (intern (format "%s-packages" (symbol-name sym)))))
(config-system//add-excluded-packages sym) (config-system//add-excluded-packages sym)
(config-system//add-layer-to-hash pkg sym config-system-all-packages))) (config-system//add-layer-to-hash
pkg sym config-system-all-packages)))
;; extensions ;; extensions
(when (file-exists-p ext-file) (when (file-exists-p ext-file)
(load ext-file) (load ext-file)
(dolist (pkg (eval (intern (format "%s-pre-extensions" (let ((list-pre (intern (format "%s-pre-extensions"
(symbol-name sym))))) (symbol-name sym))))
(config-system//add-excluded-packages sym) (list-post (intern (format "%s-post-extensions"
(config-system//add-layer-to-hash pkg sym (symbol-name sym)))))
config-system-all-pre-extensions)) (when (boundp list-pre)
(dolist (pkg (eval (intern (format "%s-post-extensions" (dolist (pkg (eval list-pre))
(symbol-name sym))))) (config-system//add-excluded-packages sym)
(config-system//add-excluded-packages sym) (config-system//add-layer-to-hash
(config-system//add-layer-to-hash pkg sym pkg sym config-system-all-pre-extensions)))
config-system-all-post-extensions)))))) (when (boundp list-post)
(dolist (pkg (eval list-post))
(config-system//add-excluded-packages sym)
(config-system//add-layer-to-hash
pkg sym config-system-all-post-extensions))))))))
(config-system//filter-out-excluded-packages) (config-system//filter-out-excluded-packages)
;; number of chuncks for the loading screen ;; number of chuncks for the loading screen
(let ((total (+ (ht-size config-system-all-packages) (let ((total (+ (ht-size config-system-all-packages)