Resolve packages to repo for pinned packages

- Allow :pin SHA's to be abbreviated.
- Print out the repo being updated, rather than the package.
This commit is contained in:
Henrik Lissner 2020-01-14 20:36:42 -05:00
parent 9745f41ded
commit b8b0f73edc
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 14 additions and 8 deletions

View file

@ -171,8 +171,12 @@ necessary package metadata is initialized and available for them."
(doom-log "Ignoring package %S" name)
(when pin
(doom-log "Pinning package %S to %S" name pin)
(setf (alist-get (symbol-name name) doom-pinned-packages
nil nil #'equal)
(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)
(with-demoted-errors "Package error: %s"