summarylogtreecommitdiffstats
path: root/tllocalmgr-pkgs-nicer-error.patch
diff options
context:
space:
mode:
authorHans-Nikolai Viessmann2020-12-02 17:11:01 +0100
committerHans-Nikolai Viessmann2020-12-02 17:11:01 +0100
commitd65e7820140a78450ad4150517a6cd3290f881f2 (patch)
treed41eee601a77901ac254242f5ec341665395e675 /tllocalmgr-pkgs-nicer-error.patch
parent9b6a3666cb736b9574967fa37836ad7766267725 (diff)
downloadaur-d65e7820140a78450ad4150517a6cd3290f881f2.tar.gz
make missing 'pkgs' error non-fatal
tllocalmgr uses 'pkgs' files in order to get version information about what texlive/CTAN packages are installed on the system. For official texlive-* packages and some other ones this works fine, but a lot of AUR packages *do not* create the a 'pkgs' file. In this situation, tllocalmgr would fatal error out. This is a little extreme, though sensible as without a valid 'pkgs' file to parse for LaTeX package versions, tllocalmgr _might_ allow for packages to be installed which are already present on the machine. This however is _unlikly_ as when installing through pacman, we should hit into the FS integrity check, causing install to fail. Ideally we would want all texlive packages to always have a 'pkgs' file but that is unlikely. An alternative idea might be to create a pacman-hook to generate one if missing, but could be very tricky and time consuming.
Diffstat (limited to 'tllocalmgr-pkgs-nicer-error.patch')
-rw-r--r--tllocalmgr-pkgs-nicer-error.patch14
1 files changed, 14 insertions, 0 deletions
diff --git a/tllocalmgr-pkgs-nicer-error.patch b/tllocalmgr-pkgs-nicer-error.patch
new file mode 100644
index 000000000000..8b528763cf6a
--- /dev/null
+++ b/tllocalmgr-pkgs-nicer-error.patch
@@ -0,0 +1,14 @@
+--- a/tllocalmgr 2020-12-02 16:46:49.214712042 +0100
++++ b/tllocalmgr 2020-12-02 17:05:02.476194535 +0100
+@@ -171,7 +171,10 @@
+ $installedcol_versions{$col} = $ver;
+ my @list = ();
+ unless ( -f "$INSTALLEDPKGS/texlive-$col\_$ver.pkgs" ) {
+- die "Cannot open $INSTALLEDPKGS/texlive-$col\_$ver.pkgs\n"
++ print BOLD RED "Cannot open $INSTALLEDPKGS/texlive-$col\_$ver.pkgs!\n";
++ print RED "-- Likely the package texlive-$col does not create the 'pkgs' file.\n";
++ print LOG "Cannot open $INSTALLEDPKGS/texlive-$col\_$ver.pkgs!\n";
++ next;
+ };
+ open INST, "<$INSTALLEDPKGS/texlive-$col\_$ver.pkgs" ;
+ while (<INST>) {