Subject: bug#48108: Wishlist: Command to remove redundant eln cache directories [native-comp]

From: Eli Zaretskii <[email-masked]>
Date: Mon, 28 Nov 2022 15:38:33 +0200

> From: Juanma Barranquero <[email-masked]>
> Date: Mon, 28 Nov 2022 14:09:42 +0100
> Cc: [email-masked], [email-masked], [email-masked]
> 
> Some of the weird things I see are perhaps the consequence of running Emacs in place from the build tree.
> 
> It is assumed that normal users have write access to native-lisp/VERSION-xxxxxxxx/, but not to
> native-lisp/VERSION-xxxxxxx/preloaded?

No, to both.

> The function already deletes any *.eln file in a stale native VERSION-xxxxxxx directory, just not the ones in
> preload/

That's a bug, IMO.  The last directory in native-comp-eln-load-path should
not be emptied.  On a multi-user system, some other user could run an Emacs
that uses the files in the native-lisp/VERSION-xxxxxxx/ directory.