On 9/19/2021 3:09 PM, Achim Gratz wrote:
Ken Brown via Cygwin-apps writes:
First of all, I think we should make /var/lib/rebase/user.d/<username>
work as documented.

No, that won't help and I should actually remove that facility since it
can't be fixed.  The user directory can not assumed to be even
accessible when setup runs.  So anything involving a user directory must
be run under that user account, after setup has completed.  Anything
that can be done via setup should be done with packages (and those can
already use the dynpath.d facility).

OK.

Users could list their emacs user directory there, and people who
build emacs themselves could also list their emacs build directory.
That way things could be kept reasonably stable in the long run via
the autorebase postinstall script.  Implicit in this is that the
results of all these rebases would be stored in the user's rebase
database.

The question of where to store the result is not really important at the
moment.  We can just re-generate the intended result each time; if and
only if that works should we then optimize via caching.

How about this as a starting point:

1. Modify rebaseall and rebaselst to recognize 'eln' as a suffix and to recognize the standard directory where emacs will install the system-wide .eln files (corresponding to the preloaded libraries).

2. Create a script /usr/bin/rebaselst_usr similar to rebaselst, with a few modifications:

a) All files are in the user's home directory:

l=${HOME}/.config/rebase
b=${HOME}/.cache/rebase
db=${l}/dynpath.d

b) Each user can create create files in ${db} containing the directories in which rebaselst_usr should look for libraries to be rebased. In the case of emacs, I would probably provide a script that users can call to create the default ${db}/emacs, containing the line ${HOME}/.emacs.d/eln-cache. I don't know if there are other packages that would want to do something similar.

c) Other obvious modifications/deletions, such as making the rebase ephemeral for now.

3. Run emacs from a script that calls rebaselst_usr before launching /usr/bin/emacs. I'll have to think about naming issues. It would be nice if the script could just be called "emacs", but then something else has to be renamed.

After each compilation, but before the new .eln file is loaded, emacs
could call rebaselst with suitable arguments to rebase that new file
(and add it to the user database).

Yes, something like that or something else with similar effect.  But
first we need to figure out if we can get it working at all.

Actually, we could probably just have emacs call rebaselst_usr after each compilation. Those .eln files that are already loaded won't be rebaseable, but so what?

Ken

Reply via email to