termux / termux-packages

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

About texmf-var folder in PREFIX #7129

Closed angelog0 closed 1 month ago

angelog0 commented 3 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 3 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 3 years ago

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

stale[bot] commented 3 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 3 years ago

@stale

...

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

twaik commented 1 month ago

Is this still reproducible?

twaik commented 1 month ago

Not reproducible anymore.

~ $ tlmgr update --all
tlmgr: package repository https://ctan.math.utah.edu/ctan/tex-archive/systems/texlive/tlnet (not verified: gpg unavailable)
tlmgr: saving backups to /data/data/com.termux/files/usr/share/texlive/2024/tlpkg/backups
[1/4, ??:??/??:??] update: exframe [12k] (53911 -> 72595) ... done
[2/4, 00:03/00:39] update: texlive-scripts [112k] (72590 -> 72597) ... done
[3/4, 00:06/00:07] update: tutodoc [9k] (72484 -> 72596) ... done
[4/4, 00:09/00:10] update: witharrows [17k] (72471 -> 72594) ... done
running mktexlsr ...
done running mktexlsr.
running updmap-sys ...
done running updmap-sys.
tlmgr: package log updated: /data/data/com.termux/files/usr/share/texlive/2024/texmf-var/web2c/tlmgr.log
tlmgr: command log updated: /data/data/com.termux/files/usr/share/texlive/2024/texmf-var/web2c/tlmgr-commands.log
~ $ ls -la $PREFIX
total 277
drwx------.  11 u0_a674 u0_a674   3488 Oct 19 23:02 .
drwxrwx--x.   4 u0_a674 u0_a674   3488 Oct 16 18:13 ..
drwx------.   3 u0_a674 u0_a674 118784 Oct 21 05:01 bin
drwx------.  26 u0_a674 u0_a674   3488 Oct 21 00:17 etc
drwx------. 311 u0_a674 u0_a674  53248 Oct 21 04:11 include
drwx------.  92 u0_a674 u0_a674 122880 Oct 21 04:11 lib
drwx------.  21 u0_a674 u0_a674   3488 Oct 21 05:01 libexec
drwxrwxr-x.   6 u0_a674 u0_a674   3488 Oct 20 01:35 opt
drwx------. 122 u0_a674 u0_a674   8192 Oct 21 04:11 share
drwx------.   7 u0_a674 u0_a674   8192 Oct 21 06:09 tmp
drwx------.  12 u0_a674 u0_a674   3488 Oct 20 01:55 var