all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Steven Allen via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 69019@debbugs.gnu.org
Subject: bug#69019: [PATCH] package-vc: scan the correct directory for lisp files
Date: Sat, 10 Feb 2024 10:51:36 -0800	[thread overview]
Message-ID: <87ttmgp2yv.fsf@stebalien.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 155 bytes --]


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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-package-vc-scan-the-correct-directory-for-lisp-files.patch --]
[-- Type: text/x-patch, Size: 2168 bytes --]

From 5a4540756e5e30d12010ce58094aafacc1b8fe01 Mon Sep 17 00:00:00 2001
From: Steven Allen <steven@stebalien.com>
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


             reply	other threads:[~2024-02-10 18:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-10 18:51 Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-02-11 12:48 ` bug#69019: [PATCH] package-vc: scan the correct directory for lisp files Philip Kaludercic
2024-02-11 22:46   ` Steven Allen
2024-02-12 17:45     ` Philip Kaludercic
2024-02-12 18:07       ` Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-13 21:07         ` Philip Kaludercic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ttmgp2yv.fsf@stebalien.com \
    --to=bug-gnu-emacs@gnu.org \
    --cc=69019@debbugs.gnu.org \
    --cc=steven@stebalien.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.