termux / termux-packages

A package build system for Termux.
https://termux.dev
Other
12.63k stars 2.91k forks source link

About texmf-var folder in PREFIX #7129

Open angelog0 opened 2 years ago

angelog0 commented 2 years ago

I just noticed that under $PREFIX there is that folder:

$ ls -lrt $PREFIX/
[...]
drwx------   3 u0_a241 u0_a241  4096 Jul  8 15:27 texmf-var    ## <== See HERE
drwx------  48 u0_a241 u0_a241  4096 Jul  8 16:41 share
drwx------   2 u0_a241 u0_a241  4096 Jul 10 14:26 tmp
drwx------   3 u0_a241 u0_a241 36864 Jul 10 14:26 bin
drwx------  22 u0_a241 u0_a241 20480 Jul 10 14:26 lib

It contents

$ ls -lrtR $PREFIX/texmf-var
/data/data/com.termux/files/usr/texmf-var:
total 8
drwx------ 3 u0_a241 u0_a241 4096 Jul  8 15:27 luatex-cache

/data/data/com.termux/files/usr/texmf-var/luatex-cache:
total 8
drwx------ 3 u0_a241 u0_a241 4096 Jul  8 15:27 context

/data/data/com.termux/files/usr/texmf-var/luatex-cache/context:
total 8
drwx------ 3 u0_a241 u0_a241 4096 Jul  8 15:27 35fbb0008d0e27ee43d738592f671f8d

/data/data/com.termux/files/usr/texmf-var/luatex-cache/context/35fbb0008d0e27ee43d738592f671f8d:
total 8
drwx------ 2 u0_a241 u0_a241 4096 Jul  8 15:27 trees

/data/data/com.termux/files/usr/texmf-var/luatex-cache/context/35fbb0008d0e27ee43d738592f671f8d/trees:
total 55920
-rw------- 1 u0_a241 u0_a241 41442630 Jul  8 15:27 890fbc406bea812bb3a448a62c137ad1.lua
-rw------- 1 u0_a241 u0_a241 15809416 Jul  8 15:27 890fbc406bea812bb3a448a62c137ad1.luc

It seems created when updating TeX Live with the tlmgr ... --list/self/all

Deleting or renaming it to something else, does not matter: it is recreate the next time.

It does not seem to be necessary to TeX Live to work. On another device, on which I just copied the $PREFIX/share/texlive directory and on which this installation works, I don't have that folder at all because on this 2nd device I don't upgrade TeXLive with tlmgr but just synchronize the folder from 1rst to 2nd device.

On GNU/Linux installation, its content lives in the same texmf-var folder which is under the main TeX Live installation folder (your $PREFIX/share/texlive).

I think the same should happen in Termux... Why NOT?

Grimler91 commented 2 years ago

Either there is an additional place where we need to replace SELFAUTOPARENT with TEXMFROOT, or tlmgr upgrades itself and reverses the patch we apply, and then uses the wrong texmf-var when installing/upgrading additional packages.

The former seems more likely.

Grimler91 commented 2 years ago

Since all the files are luatex related there is probably a luatex script that needs to be patched

stale[bot] commented 2 years ago

This issue/PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

angelog0 commented 2 years ago

@stale

...

If none has a solution, it does not mean the bug is fixed... Maybe we have to ask upstream..