Resolve pinned packages based on overridden recipes
And rearrange "Checking out ..." message during 'doom upgrade' to display package first, then commit (and abbreviated), rather than the other around. It's easier to read.
This commit is contained in:
parent
b7e81bc042
commit
f3a9d0c03c
2 changed files with 13 additions and 12 deletions
|
@ -158,8 +158,8 @@ declaration) or dependency thereof that hasn't already been."
|
||||||
fetch-p)
|
fetch-p)
|
||||||
(unless (or (and (stringp newcommit)
|
(unless (or (and (stringp newcommit)
|
||||||
(straight-vc-commit-present-p recipe newcommit)
|
(straight-vc-commit-present-p recipe newcommit)
|
||||||
(print! (start "\033[K(%d/%d) Checking out %s for %s...\033[1A")
|
(print! (start "\033[K(%d/%d) Checking out %s (%s)...\033[1A")
|
||||||
i total newcommit package))
|
i total package (substring newcommit 0 7)))
|
||||||
(and (print! (start "\033[K(%d/%d) Fetching %s...\033[1A")
|
(and (print! (start "\033[K(%d/%d) Fetching %s...\033[1A")
|
||||||
i total package)
|
i total package)
|
||||||
(straight-vc-fetch-from-remote recipe)
|
(straight-vc-fetch-from-remote recipe)
|
||||||
|
|
|
@ -169,15 +169,6 @@ necessary package metadata is initialized and available for them."
|
||||||
(with-plist! (cdr package) (recipe modules disable ignore pin)
|
(with-plist! (cdr package) (recipe modules disable ignore pin)
|
||||||
(if ignore
|
(if ignore
|
||||||
(doom-log "Ignoring package %S" name)
|
(doom-log "Ignoring package %S" name)
|
||||||
(when pin
|
|
||||||
(doom-log "Pinning package %S to %S" name pin)
|
|
||||||
(setf (alist-get
|
|
||||||
(if-let* ((recipe (cdr (straight-recipes-retrieve name)))
|
|
||||||
(repo (straight-vc-local-repo-name recipe)))
|
|
||||||
repo
|
|
||||||
(symbol-name name))
|
|
||||||
doom-pinned-packages nil nil #'equal)
|
|
||||||
pin))
|
|
||||||
(if (not disable)
|
(if (not disable)
|
||||||
(with-demoted-errors "Package error: %s"
|
(with-demoted-errors "Package error: %s"
|
||||||
(when recipe
|
(when recipe
|
||||||
|
@ -190,7 +181,17 @@ necessary package metadata is initialized and available for them."
|
||||||
(print! (warn "%s\n%s")
|
(print! (warn "%s\n%s")
|
||||||
(format "You've disabled %S" name)
|
(format "You've disabled %S" name)
|
||||||
(indent 2 (concat "This is a core package. Disabling it will cause errors, as Doom assumes\n"
|
(indent 2 (concat "This is a core package. Disabling it will cause errors, as Doom assumes\n"
|
||||||
"core packages are always available. Disable their minor-modes or hooks instead.")))))))))))
|
"core packages are always available. Disable their minor-modes or hooks instead.")))))
|
||||||
|
(when pin
|
||||||
|
(let ((realname
|
||||||
|
(if-let* ((recipe (cdr (straight-recipes-retrieve name)))
|
||||||
|
(repo (straight-vc-local-repo-name recipe)))
|
||||||
|
repo
|
||||||
|
(symbol-name name))))
|
||||||
|
(doom-log "Pinning package %S to %S" realname pin)
|
||||||
|
(setf (alist-get realname doom-pinned-packages
|
||||||
|
nil nil #'equal)
|
||||||
|
pin)))))))))
|
||||||
|
|
||||||
(defun doom-ensure-straight ()
|
(defun doom-ensure-straight ()
|
||||||
"Ensure `straight' is installed and was compiled with this version of Emacs."
|
"Ensure `straight' is installed and was compiled with this version of Emacs."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue