fix: package recipes with relative :local-repo

Necessitated by 7e0c2ed, and missed in 45a66cd. This would indirectly
cause "No :repo specified for package 'X'" errors for packages with a
`:local-repo` relative to their packages.el file.

Amend: 45a66cda60
Ref: 7e0c2ed8a3
This commit is contained in:
Henrik Lissner 2022-09-10 20:41:21 +02:00
parent c80fa2efdf
commit 251ccbcc6b
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -554,11 +554,11 @@ elsewhere."
(cl-callf map-delete plist :built-in)
(cl-callf plist-put plist :ignore built-in))
`(let* ((name ',name)
(plist (cdr (assq name doom-packages))))
(plist (cdr (assq name doom-packages)))
(dir (dir!)))
;; Record what module this declaration was found in
(let* ((dir (dir!))
(module-list (plist-get plist :modules))
(module (doom-module-from-path dir)))
(let ((module-list (plist-get plist :modules))
(module (doom-module-from-path dir)))
(unless (member module module-list)
(cl-callf plist-put plist :modules
(append module-list
@ -582,7 +582,7 @@ elsewhere."
(when local-repo
(cl-callf plist-put plist :recipe
(plist-put recipe :local-repo
(let ((local-path (expand-file-name local-repo ,(dir!))))
(let ((local-path (expand-file-name local-repo dir)))
(if (file-directory-p local-path)
local-path
local-repo)))))))