emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/package+vc d5dbf0804c: * package-vc.el (package-vc-unpack): Fix


From: Philip Kaludercic
Subject: feature/package+vc d5dbf0804c: * package-vc.el (package-vc-unpack): Fix 'vc-ignore' call
Date: Tue, 30 Aug 2022 05:33:55 -0400 (EDT)

branch: feature/package+vc
commit d5dbf0804c5a3025f7946991a39ec26c01f76212
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>

    * 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.
---
 lisp/emacs-lisp/package-vc.el | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el
index ee6a3e79dd..2a45bacf6e 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))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]