Hi David,
David Bremner <david@tethera.net> writes:
> Xiyue Deng <manphiz@gmail.com> writes:
>
>>
>> +# Disable adding sub-directories to `load-path'
>> +for DIR in ${el_dir}/*; do [ -d ${DIR} ] && touch ${DIR}/.nosearch; done
>
> I wonder about quoting here. I tend to overquote in shell scripts, but
> what if some subdirectory has whitespace in the name?
>
Good point. Now quoted all variables (including in helper/remove)
>> +# Remove entries that disable recursive `load-path' handling in sub-directories
>> +find ${elc_dir} -name ".nosearch" -exec rm {} \;
>> +find ${el_dir} -name ".nosearch" -exec rm {} \;
>
> I think it's better to use find -delete here?
>
>
Doing "-exec rm {} \;" was just out of habit as it seems to be supported
since always. Now changed to "-type f -delete" trying to be more safe.
>> +
>> if test -e "${elc_dir}"
>> then
>> rmdir --ignore-fail-on-non-empty "${elc_dir}"
>> --
>> 2.39.2
>
> In theory, I think an addon package could ship subdirs.el. In practice
> this doesn't seem to happen much (at least I did not find any examples
> cases). How should we handle this? Add a check? Ignore the possibility?
> Does the emacs packaging documentation have anything to say about this?
>
> d
Actually I think you bring up a good point that I also didn't get a
clear answer in my previous query to emacs-devel[1]: if a package want
to add a subdir to `load-path', how to do it? Currently we don't see
any example, and the only package that don't want to load a subdir is
auctex, which I tried to ITS but the original maintainer just came back
and will take care of it himself[2], so I guess there is currently
nothing to do at dh-elpa's side.
So for now I think it's OK to let this bug wait until after Trixie, but
keep it open and observe its development (also pushed the changes to
no-recursive-handling branch for tracking). Will follow up should any
use-case comes up.
(And it looks like waiting is not a bad strategy after all :)
[1] https://lists.gnu.org/archive/html/emacs-devel/2024-05/msg00658.html
[2] https://bugs.debian.org/1094224
--
Regards,
Xiyue Deng
Attachment:
signature.asc
Description: PGP signature