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
|
(t
|
||||||
(let* ((pkg-dir (concat file-name "-" version))
|
(let* ((pkg-dir (concat file-name "-" version))
|
||||||
(pkg-file (concat file-name "-pkg.el"))
|
(pkg-file (concat file-name "-pkg.el"))
|
||||||
(pkg-info (package-build-get-pkg-file-info
|
(pkg-info
|
||||||
(expand-file-name pkg-file pkg-cwd))))
|
(package-build-merge-package-info
|
||||||
|
(let ((default-directory pkg-cwd))
|
||||||
(copy-directory file-name pkg-dir)
|
(or (package-build-get-pkg-file-info pkg-file)
|
||||||
|
|
||||||
(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
|
;; some packages (like magit) provide name-pkg.el.in
|
||||||
(unless pkg-info
|
(package-build-get-pkg-file-info (concat pkg-file ".in"))
|
||||||
(setq pkg-info (package-build-get-pkg-file-info
|
(package-build-get-package-info (concat file-name ".el"))))
|
||||||
(expand-file-name (concat pkg-file ".in")
|
file-name version)))
|
||||||
pkg-cwd))))
|
|
||||||
|
|
||||||
(setq pkg-info
|
|
||||||
(package-build-merge-package-info pkg-info file-name version))
|
|
||||||
(print pkg-info)
|
(print pkg-info)
|
||||||
|
(copy-directory file-name pkg-dir)
|
||||||
|
|
||||||
(package-build-pkg-file (expand-file-name
|
(package-build-pkg-file (expand-file-name
|
||||||
pkg-file
|
pkg-file
|
||||||
|
|
Loading…
Reference in a new issue