mirror of
https://github.com/correl/melpa.git
synced 2024-11-24 19:19:52 +00:00
Tidy up the fallback code for locating package info in .pkg, .pkg.in, and .el files
This commit is contained in:
parent
c8e29ccda9
commit
3924aa896d
1 changed files with 9 additions and 17 deletions
|
@ -298,25 +298,17 @@ If PKG-INFO is nil, an empty one is created."
|
|||
(t
|
||||
(let* ((pkg-dir (concat file-name "-" version))
|
||||
(pkg-file (concat file-name "-pkg.el"))
|
||||
(pkg-info (package-build-get-pkg-file-info
|
||||
(expand-file-name pkg-file pkg-cwd))))
|
||||
(pkg-info
|
||||
(package-build-merge-package-info
|
||||
(let ((default-directory pkg-cwd))
|
||||
(or (package-build-get-pkg-file-info pkg-file)
|
||||
;; some packages (like magit) provide name-pkg.el.in
|
||||
(package-build-get-pkg-file-info (concat pkg-file ".in"))
|
||||
(package-build-get-package-info (concat file-name ".el"))))
|
||||
file-name version)))
|
||||
|
||||
(copy-directory file-name pkg-dir)
|
||||
|
||||
(unless pkg-info
|
||||
(setq pkg-info (package-build-get-package-info
|
||||
(expand-file-name (concat file-name ".el")
|
||||
pkg-cwd))))
|
||||
|
||||
;; some packages (like magit) provide name-pkg.el.in
|
||||
(unless pkg-info
|
||||
(setq pkg-info (package-build-get-pkg-file-info
|
||||
(expand-file-name (concat pkg-file ".in")
|
||||
pkg-cwd))))
|
||||
|
||||
(setq pkg-info
|
||||
(package-build-merge-package-info pkg-info file-name version))
|
||||
(print pkg-info)
|
||||
(copy-directory file-name pkg-dir)
|
||||
|
||||
(package-build-pkg-file (expand-file-name
|
||||
pkg-file
|
||||
|
|
Loading…
Reference in a new issue