Subject: bug#69019: closed (Re: bug#69019: [PATCH] package-vc: scan the correct directory for lisp files)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 13 Feb 2024 21:09:02 +0000

Your bug report

#69019: [PATCH] package-vc: scan the correct directory for lisp files

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
69019: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=69019
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#69019: [PATCH] package-vc: scan the correct directory for lisp files
From: Philip Kaludercic <[email-masked]>
To: Steven Allen <[email-masked]>
Cc: [email-masked]
Date: Tue, 13 Feb 2024 21:07:34 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Steven Allen <[email-masked]> writes:

> Philip Kaludercic <[email-masked]> writes:
>> OK, I have slightly modified the commit, can you check if it still works
>> for you:
>
> Tested and confirmed working. And thanks for CCing the list.

OK, I'll push that then under your name and close this bug report.
Thank you for your help!

Subject: [PATCH] package-vc: scan the correct directory for lisp files
From: Steven Allen <[email-masked]>
To: [email-masked]
Date: Sat, 10 Feb 2024 10:51:36 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Following up on my previous patch (Bug#68761), we need to scan for
package requirements inside the lisp-dir (if set), not in the root
package directory.

>From 5a4540756e5e30d12010ce58094aafacc1b8fe01 Mon Sep 17 00:00:00 2001
From: Steven Allen <[email-masked]>
Date: Sat, 10 Feb 2024 10:05:11 -0800
Subject: [PATCH] package-vc: scan the correct directory for lisp files

Otherwise, we won't correctly detect package requirements.

* lisp/emacs-lisp/package-vc.el (package-vc--unpack-1):
  Scan 'lisp-dir', if set, for lisp files instead of scanning the root
  package directory.
---
 lisp/emacs-lisp/package-vc.el | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el
index fc402716dab..2730100b3d0 100644
--- a/lisp/emacs-lisp/package-vc.el
+++ b/lisp/emacs-lisp/package-vc.el
@@ -501,8 +501,9 @@ package-vc--unpack-1
 autoloads, generating a package description file (used to
 identify a package as a VC package later on), building
 documentation and marking the package as installed."
-  (let ((pkg-spec (package-vc--desc->spec pkg-desc))
-        missing)
+  (let* ((pkg-spec (package-vc--desc->spec pkg-desc))
+         (lisp-dir (plist-get pkg-spec :lisp-dir))
+         missing)
 
     ;; In case the package was installed directly from source, the
     ;; dependency list wasn't know beforehand, and they might have
@@ -519,7 +520,7 @@ package-vc--unpack-1
                 "\\|")
              regexp-unmatchable))
           (deps '()))
-      (dolist (file (directory-files pkg-dir t "\\.el\\'" t))
+      (dolist (file (directory-files (file-name-concat pkg-dir lisp-dir) t "\\.el\\'" t))
         (unless (string-match-p ignored-files file)
           (with-temp-buffer
             (insert-file-contents file)
@@ -542,8 +543,7 @@ package-vc--unpack-1
           (pkg-file (expand-file-name (package--description-file pkg-dir) pkg-dir)))
       ;; Generate autoloads
       (let* ((name (package-desc-name pkg-desc))
-             (auto-name (format "%s-autoloads.el" name))
-             (lisp-dir (plist-get pkg-spec :lisp-dir)))
+             (auto-name (format "%s-autoloads.el" name)))
         (package-generate-autoloads
          name (file-name-concat pkg-dir lisp-dir))
         (when lisp-dir
-- 
2.43.0