summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorPhilip Kaludercic <philipk@posteo.net>2022-08-30 11:28:50 +0200
committerPhilip Kaludercic <philipk@posteo.net>2022-08-30 11:28:54 +0200
commitd5dbf0804c5a3025f7946991a39ec26c01f76212 (patch)
tree49290ee8cfa3dd9aba5aaddb1a964fb801325ff3 /lisp/emacs-lisp
parent54dbd7d55c3705c00482eed9272e70df259d7147 (diff)
downloademacs-d5dbf0804c5a3025f7946991a39ec26c01f76212.tar.gz
emacs-d5dbf0804c5a3025f7946991a39ec26c01f76212.tar.bz2
emacs-d5dbf0804c5a3025f7946991a39ec26c01f76212.zip
* package-vc.el (package-vc-unpack): Fix 'vc-ignore' call
When generating the manual node (/dir), we need to ensure that the default-directory is set to the package root, otherwise the file is ignored in some other repository, that probably doesn't exist.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/package-vc.el26
1 files changed, 13 insertions, 13 deletions
diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el
index ee6a3e79dd8..2a45bacf6e9 100644
--- a/lisp/emacs-lisp/package-vc.el
+++ b/lisp/emacs-lisp/package-vc.el
@@ -169,7 +169,7 @@ The output is written out into PKG-FILE."
(package-download-transaction
(package-compute-transaction nil (delete-dups deps)))))
- (let ((default-directory pkg-dir)
+ (let ((default-directory (file-name-as-directory pkg-dir))
(name (package-desc-name pkg-desc))
(pkg-file (expand-file-name (package--description-file pkg-dir) pkg-dir)))
;; Generate autoloads
@@ -180,7 +180,18 @@ The output is written out into PKG-FILE."
;; Generate package file
(package-vc-generate-description-file pkg-desc pkg-file)
- (vc-ignore (concat "/" (file-relative-name pkg-file default-directory))))
+ (vc-ignore (concat "/" (file-relative-name pkg-file default-directory)))
+
+ ;; Detect a manual
+ (when (executable-find "install-info")
+ ;; Only proceed if we can find an unambiguous TeXinfo file
+ (let ((texi-files (directory-files pkg-dir t "\\.texi\\'"))
+ (dir-file (expand-file-name "dir" pkg-dir)))
+ (when (length= texi-files 1)
+ (call-process "install-info" nil nil nil
+ (concat "--dir=" dir-file)
+ (car texi-files)))
+ (vc-ignore "/dir"))))
;; Update package-alist.
(let ((new-desc (package-load-descriptor pkg-dir)))
@@ -198,17 +209,6 @@ The output is written out into PKG-FILE."
;; `activate-1', so that we use the byte-compiled definitions.
(package--reload-previously-loaded new-desc)))
- ;; Detect a manual
- (when (executable-find "install-info")
- ;; Only proceed if we can find an unambiguous TeXinfo file
- (let ((texi-files (directory-files pkg-dir t "\\.texi\\'"))
- (dir-file (expand-file-name "dir" pkg-dir)))
- (when (length= texi-files 1)
- (call-process "install-info" nil nil nil
- (concat "--dir=" dir-file)
- (car texi-files)))
- (vc-ignore "/dir")))
-
;; Mark package as selected
(package--save-selected-packages
(cons name package-selected-packages))))