4

How to "fake packages" for TeX Live on Arch Linux?

I installed TeX Live directly from the script rather than the Arch packages. However pacman is unaware that I installed it and tries to install texlive- packages when I install other science-related software.

$ sudo pacman -Syu --needed sagetex
:: Synchronizing package databases...
 core is up to date
 extra is up to date
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...

Packages (6) dvisvgm-3.1.1-1 texlive-basic-2023.66594-19 texlive-bin-2023.66984-16 texlive-latex-2023.66594-19 texlive-latexrecommended-2023.66594-19 sagetex-3.6.1-4

Total Installed Size: 120.16 MiB

:: Proceed with installation? [Y/n]

I found this guide on how to trick the package manager but it was only for Debian-based distributions. How can I do the same on Arch?

  • I am moving to manjaro. I have installed TeX Live using an AUR. I think this should work better in your case. No? – projetmbc Sep 24 '23 at 09:45
  • 1
    @projetmbc It won't work better. Whether it works equally well and is easier to manage depends on the quality of the PKGBUILD. One of them installs into /opt which is not necessarily the best place. It's easier if you have things where documentation etc. expects. Also, if you do that, you have to install with root privileges. While the OP likely did that anyway, I prefer installing as an unprivileged user for security reasons. It is incredibly easy to create a dummy package on Arch (unlike Fedora, say). I don't see a reason to install TeX Live from AUR. A native installation is more KISS. – cfr Sep 24 '23 at 19:56

1 Answers1

2

Here's my PKGBUILD for the dummy package I'm currently using on Arch:

pkgname=texlive-dummy-cfr
pkgver=2.0
pkgrel=1
pkgdesc="TeX typesetting program"
arch=(i686 x86_64)
license=('custom')
provides=('tetex' 'texlive-bin' 'texlive-core' 'texinfo' 'texlive-basic')
conflicts=('tetex' 'texlive-bin' 'texlive-core' 'texlive-basic')
build() {
/bin/true
}
package() {
/bin/true
}

Build and install this in the usual way (as you would for any other AUR package).

In addition, I have the following lines in /etc/pacman.conf as a safety net:

IgnorePkg   = texlive-bin
IgnoreGroup = texlive-most texlive-lang

If you install or update something TeX-related, you should still be alert to problems. From time to time, the packaging changes and you need to adapt the PKGBUILD to prevent wholesale installation of the packaged versions.

cfr
  • 198,882