Fixes #182 Pre-extensions var are required by default
Pre and Post extensions lists are now optional.
This commit is contained in:
parent
88cf604396
commit
20fecf2984
1 changed files with 17 additions and 12 deletions
|
@ -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))))
|
||||||
|
(list-post (intern (format "%s-post-extensions"
|
||||||
(symbol-name sym)))))
|
(symbol-name sym)))))
|
||||||
|
(when (boundp list-pre)
|
||||||
|
(dolist (pkg (eval list-pre))
|
||||||
(config-system//add-excluded-packages sym)
|
(config-system//add-excluded-packages sym)
|
||||||
(config-system//add-layer-to-hash pkg sym
|
(config-system//add-layer-to-hash
|
||||||
config-system-all-pre-extensions))
|
pkg sym config-system-all-pre-extensions)))
|
||||||
(dolist (pkg (eval (intern (format "%s-post-extensions"
|
(when (boundp list-post)
|
||||||
(symbol-name sym)))))
|
(dolist (pkg (eval list-post))
|
||||||
(config-system//add-excluded-packages sym)
|
(config-system//add-excluded-packages sym)
|
||||||
(config-system//add-layer-to-hash pkg sym
|
(config-system//add-layer-to-hash
|
||||||
config-system-all-post-extensions))))))
|
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)
|
||||||
|
|
Reference in a new issue