Debian Codegraph @

debian/patches/debian-tlmgr-usermode_2

raw
1 --- texlive-base-2026.20260328.orig/texmf-dist/scripts/texlive/tlmgr.pl
2 +++ texlive-base-2026.20260328/texmf-dist/scripts/texlive/tlmgr.pl
3 @@ -631,6 +631,13 @@
4 tldie("$prg: Try --help if you need it.\n");
5 }
6
7 + # automatically switch to user mode on Debian, and warn
8 + if (!$opts{"usermode"} && $action ne "init-usertree") {
9 + $opts{"usermode"} = 1;
10 + print "(running on Debian, switching to user mode!)\n";
11 + print "(see /usr/share/doc/texlive-base/README.tlmgr-on-Debian.md)\n";
12 + }
13 +
14 # nice to have the version if debugging.
15 debug("tlmgr version $tlmgrversion\n");
16
17 @@ -6395,7 +6402,9 @@
18 # sets up the user tree for tlmgr in user mode
19 sub action_init_usertree {
20 # init_local_db but do not die if localtlpdb is not found!
21 - init_local_db(2);
22 + # Debian: we don't ship tlpdb for system files, so don't even
23 + # try to initialize it.
24 + # init_local_db(2);
25 my $tlpdb = TeXLive::TLPDB->new;
26 my $usertree;
27 if ($opts{"usertree"}) {
28 @@ -7180,7 +7189,11 @@
29 if ($should_i_die == 2) {
30 return undef;
31 } else {
32 - die("cannot setup TLPDB in $::maintree");
33 + if ($opts{'usermode'}) {
34 + die("$prg: user mode not initialized, please read the documentation!\n");
35 + } else {
36 + die("cannot setup TLPDB in $::maintree");
37 + }
38 }
39 }
40 # setup the programs, for w32 we need the shipped wget/xz etc, so we
41 --- texlive-base-2026.20260328.orig/texmf-dist/doc/man/man1/tlmgr.1
42 +++ texlive-base-2026.20260328/texmf-dist/doc/man/man1/tlmgr.1
43 @@ -79,6 +79,8 @@
44 <https://tug.org/texlive/tlmgr.html>, along with procedures for updating
45 \&\f(CW\*(C`tlmgr\*(C'\fR itself and information about test versions.
46 .PP
47 +WARNING: tlmgr in Debian runs always in user mode
48 +.PP
49 TeX Live is organized into a few top\-level \fIschemes\fR, each of which is
50 specified as a different set of \fIcollections\fR and \fIpackages\fR, where a
51 collection is a set of packages, and a package is what contains actual