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

Previous Next

Package: emacs;

Reported by: Steven Allen <steven <at> stebalien.com>

Date: Sat, 10 Feb 2024 18:53:02 UTC

Severity: normal

Tags: patch

Done: Philip Kaludercic <philipk <at> posteo.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 69019 in the body.
You can then email your comments to 69019 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#69019; Package emacs. (Sat, 10 Feb 2024 18:53:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Steven Allen <steven <at> stebalien.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 10 Feb 2024 18:53:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Steven Allen <steven <at> stebalien.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] package-vc: scan the correct directory for lisp files
Date: Sat, 10 Feb 2024 10:51:36 -0800
[Message part 1 (text/plain, inline)]
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.

[0001-package-vc-scan-the-correct-directory-for-lisp-files.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#69019; Package emacs. (Sun, 11 Feb 2024 12:55:01 GMT) Full text and rfc822 format available.

Message #8 received at 69019 <at> debbugs.gnu.org (full text, mbox):

From: Philip Kaludercic <philipk <at> posteo.net>
To: Steven Allen <steven <at> stebalien.com>
Cc: 69019 <at> debbugs.gnu.org
Subject: Re: bug#69019: [PATCH] package-vc: scan the correct directory for
 lisp files
Date: Sun, 11 Feb 2024 12:48:08 +0000
Steven Allen <steven <at> stebalien.com> writes:

> 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.

Looks good, do you have any specific examples where this caused
problems?

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

Just note that the convention of the commit message logs is not to
indent the lines here.  I can take care of that.

> ---
>  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

-- 
Philip Kaludercic




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#69019; Package emacs. (Mon, 12 Feb 2024 17:42:02 GMT) Full text and rfc822 format available.

Message #11 received at 69019 <at> debbugs.gnu.org (full text, mbox):

From: Steven Allen <steven <at> stebalien.com>
To: Philip Kaludercic <philipk <at> posteo.net>
Cc: 69019 <at> debbugs.gnu.org
Subject: Re: bug#69019: [PATCH] package-vc: scan the correct directory for
 lisp files
Date: Sun, 11 Feb 2024 22:46:51 +0000
>> 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.
>
> Looks good, do you have any specific examples where this caused
> problems?

pdf-tools puts all its files in a "lisp" dir, so they weren't getting
searched when scanning for dependencies. The package definition is:


    (:url "https://github.com/vedang/pdf-tools/pulls"
     :lisp-dir "lisp")

This patch causes package-vc to scan for dependencies in elisp files in
"$pkg-dir/lisp/", instead of looking for elisp files in "$pkg-dir/".

>> * 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.
>
> Just note that the convention of the commit message logs is not to
> indent the lines here.  I can take care of that.

I did not, thanks!




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#69019; Package emacs. (Mon, 12 Feb 2024 17:47:02 GMT) Full text and rfc822 format available.

Message #14 received at 69019 <at> debbugs.gnu.org (full text, mbox):

From: Philip Kaludercic <philipk <at> posteo.net>
To: Steven Allen <steven <at> stebalien.com>
Cc: 69019 <at> debbugs.gnu.org
Subject: Re: bug#69019: [PATCH] package-vc: scan the correct directory for
 lisp files
Date: Mon, 12 Feb 2024 17:45:59 +0000
[Message part 1 (text/plain, inline)]
(Don't forget to keep the bug tracker in the CC's; I have resent your
message so that everything remains in the archives)

Steven Allen <steven <at> stebalien.com> writes:

>>> 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.
>>
>> Looks good, do you have any specific examples where this caused
>> problems?
>
> pdf-tools puts all its files in a "lisp" dir, so they weren't getting
> searched when scanning for dependencies. The package definition is:
>
>     (:url "https://github.com/vedang/pdf-tools/pulls"
>      :lisp-dir "lisp")
>
> This patch causes package-vc to scan for dependencies in elisp files in
> "$pkg-dir/lisp/", instead of looking for elisp files in "$pkg-dir/".

OK, I have slightly modified the commit, can you check if it still works
for you:

[0001-Respect-lisp-dir-whilst-scanning-for-VC-package-depe.patch (text/x-patch, attachment)]
[Message part 3 (text/plain, inline)]
>>> * 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.
>>
>> Just note that the convention of the commit message logs is not to
>> indent the lines here.  I can take care of that.
>
> I did not, thanks!

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#69019; Package emacs. (Mon, 12 Feb 2024 18:17:01 GMT) Full text and rfc822 format available.

Message #17 received at 69019 <at> debbugs.gnu.org (full text, mbox):

From: Steven Allen <steven <at> stebalien.com>
To: Philip Kaludercic <philipk <at> posteo.net>
Cc: 69019 <at> debbugs.gnu.org
Subject: Re: bug#69019: [PATCH] package-vc: scan the correct directory for
 lisp files
Date: Mon, 12 Feb 2024 10:07:55 -0800
Philip Kaludercic <philipk <at> posteo.net> 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.




Reply sent to Philip Kaludercic <philipk <at> posteo.net>:
You have taken responsibility. (Tue, 13 Feb 2024 21:09:02 GMT) Full text and rfc822 format available.

Notification sent to Steven Allen <steven <at> stebalien.com>:
bug acknowledged by developer. (Tue, 13 Feb 2024 21:09:02 GMT) Full text and rfc822 format available.

Message #22 received at 69019-done <at> debbugs.gnu.org (full text, mbox):

From: Philip Kaludercic <philipk <at> posteo.net>
To: Steven Allen <steven <at> stebalien.com>
Cc: 69019-done <at> debbugs.gnu.org
Subject: Re: bug#69019: [PATCH] package-vc: scan the correct directory for
 lisp files
Date: Tue, 13 Feb 2024 21:07:34 +0000
Steven Allen <steven <at> stebalien.com> writes:

> Philip Kaludercic <philipk <at> posteo.net> 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!




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 13 Mar 2024 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 158 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.