GNU bug report logs -
#63625
29.0.90; package-install inserts package directory into load-path twice.
Previous Next
Reported by: todd smith <toddasmith <at> mac.com>
Date: Sun, 21 May 2023 07:33:01 UTC
Severity: normal
Tags: fixed
Found in version 29.0.90
Fixed in version 29.1
Done: Robert Pluim <rpluim <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #14 received at 63625 <at> debbugs.gnu.org (full text, mbox):
>>>>> On Mon, 22 May 2023 14:25:02 +0300, Eli Zaretskii <eliz <at> gnu.org> said:
>> Cc: todd smith <toddasmith <at> mac.com>
>> From: Robert Pluim <rpluim <at> gmail.com>
>> Date: Mon, 22 May 2023 10:55:13 +0200
>>
>> This is because we didnʼt respect DRY. package.el should use the
>> package support of `loaddefs-generate', but that doesnʼt expose the
>> requisite feature of `loaddefs-generate--rubric' (maybe on master it does).
>>
>> diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
>> index 78017b77677..31e5e0809a8 100644
>> --- a/lisp/emacs-lisp/package.el
>> +++ b/lisp/emacs-lisp/package.el
>> @@ -1107,8 +1107,9 @@ package-generate-autoloads
>> ;; Add the directory that will contain the autoload file to
>> ;; the load path. We don't hard-code `pkg-dir', to avoid
>> ;; issues if the package directory is moved around.
>> + (directory-file-name
>> (or (and load-file-name (file-name-directory load-file-name))
>> - (car load-path)))))
>> + (car load-path))))))
>> (let ((buf (find-buffer-visiting output-file)))
>> (when buf (kill-buffer buf)))
>> auto-name))
Eli> Thanks.
Eli> Philip, Stefan: any comments or suggestions?
Two other things:
1. Can `load-file-name' ever be nil here?
2. Should we just use $# instead of `load-file-nameʼ'?
(I also have a sneaking suspicion that this adding to `load-path' is
being done twice, but Iʼll look at that when this issue is fixed)
Robert
--
This bug report was last modified 2 years and 22 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.