#1071763 texlive-base: tlmgr gives misinfo about installed pkgs + runs in user mode as root

#1071763#5
Date:
2024-05-24 18:59:19 UTC
From:
To:
I was surprised tlmgr had to access the cloud to tell me what version
of the acro pkg I have installed:

===8<----------------------------------------
  $ tlmgr --usermode info acro
/usr/bin/tlmgr: TLPDB::from_file could not initialize from: https://mirror.ctan.org/systems/texlive/tlnet/tlpkg/texlive.tlpdb
/usr/bin/tlmgr: Maybe the repository setting should be changed.
/usr/bin/tlmgr: More info: https://tug.org/texlive/acquire.html
===8<----------------------------------------

Then noticed docs state “If *pkg* is not locally installed, searches
in the remote installation source.” Although the acro pkg is locally
installed, I added the --only-installed option because the cloud
should not be needed:

===8<----------------------------------------
  $ tlmgr --usermode info --only-installed acro
  package:     acro
  installed:   No
===8<----------------------------------------

I know acro is installed system-wide, so tlmgr is apparently not
finding it when I run as a user and thus may only know about
user-installed pkgs. So I ran as root:

===8<----------------------------------------
  # tlmgr info --only-installed acro
  (running on Debian, switching to user mode!)
  (see /usr/share/doc/texlive-base/README.tlmgr-on-Debian.md)
  TLPDB: not a directory, not loading: /root/.local/share/texmf
  tlmgr: user mode not initialized, please read the documentation!
===8<----------------------------------------

I was baffled that it’s switching to user mode when running as
root. This comment clarifies:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=907415#8

It’s because tlmgr runs on Debian that it runs in user mode. That’s
not exactly clear from the output message:

  “(running on Debian, switching to user mode!)”

I took that to mean tlmgr detected a Debian system for some reason
beyond me, and that it also switched to user mode for some other
reason beyond me. It would be more clear if it said:

  “(running on Debian THUS switching to user mode!)”

Users will still be astonished about why Debian implies that we can
only run as a user, but it would at least be clear that user mode is
an intentional consequence of being on Debian.

#1071763#10
Date:
2024-05-25 05:25:16 UTC
From:
To:
Hi Manny,

All the three bugs boil down to the same:

tlmgr is NOT supported if you install it via Debian.
Only VERY REDUCED functionality is provided, as you found.

For example, tlmgr info does not work because we don't have a tlpdb
at hand.

Yes, that is the meaning. I think this is obvious enough.,

See above.

You need to point it to the last available 2022 repository, see historic
TL releases.

Yes.

Don't use tlmgr on Debian if you are not happy with the insufficiences.

Yes, see above, historic
https://www.tug.org/historic/
So for 2022 you can for example
https://pi.kwarc.info/historic/systems/texlive/2022/tlnet-final/

CTAN only carries the most recent release.

The most recent.

No IT CANNOT.

the files are installed by root and apt.
tlmgr can do this when you run upstream TeX LIve, but NOT Debian TeX
Live.

You cannot downgrade but downgrade to older versions of Debian / TeX
Live.

There is nothing to do about this, tlmgr is the configuration management
system for TeX Live as it is provided by upstream. It conflicts with
apt/dpkg. Trying to do a few things by setting it to user mode does
not fix all the other problems.

Best regards

Norbert
(author of tlmgr, and author of the TeX Live packaging in Debian)