summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans-Nikolai Viessmann2020-12-02 17:11:01 +0100
committerXZS2022-09-13 14:08:00 +0200
commit0967012f99ade45b3fc3972abdd2d5ccc4d39029 (patch)
tree5b24adc267860338dc60936de1f92b087f0c32aa
parent0aae9ff6bf58c916298c8e2b63c9c8e356f25640 (diff)
downloadaur-0967012f99ade45b3fc3972abdd2d5ccc4d39029.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.
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD11
-rw-r--r--tllocalmgr-pkgs-nicer-error.patch14
3 files changed, 25 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 92035c00cbff..9b707ed98228 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = texlive-localmanager-git
pkgdesc = A shell and command-line utility to manage TeXLive on Arch Linux
pkgver = v0.7.r3.gbbd8488
- pkgrel = 5
+ pkgrel = 6
url = https://git.archlinux.org/users/remy/texlive-localmanager.git/
arch = any
license = GPL
@@ -19,10 +19,12 @@ pkgbase = texlive-localmanager-git
source = tllocalmgr-2020.patch
source = tllocalmgr-enhance.patch
source = tllocalmgr-fix-texlive-local-match.patch
+ source = tllocalmgr-pkgs-nicer-error.patch
sha256sums = SKIP
sha256sums = cdd88b9d8b87fcd6117a3ef6c9dd69ac1103a15beb966d64f2ad1996b574a1f1
sha256sums = 22222ff329919ee6a16ffd489b0213b14f8169d9daf6ef1a82aa5ab37538c236
sha256sums = a7698d0076f4e1a7ef401899c174ed9a290674a7e89e9c818ba078e17548c6e7
+ sha256sums = 1538426adada826f8faeed826e9be5f5610ade23ce0437535e39662294e6e108
pkgname = texlive-localmanager-git
diff --git a/PKGBUILD b/PKGBUILD
index 826781505b3f..a2322396426c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,7 +7,7 @@
pkgname=texlive-localmanager-git
_pkgname="${pkgname%-git}"
pkgver=v0.7.r3.gbbd8488
-pkgrel=5
+pkgrel=6
pkgdesc='A shell and command-line utility to manage TeXLive on Arch Linux'
arch=('any')
url='https://git.archlinux.org/users/remy/texlive-localmanager.git/'
@@ -26,11 +26,13 @@ makedepends=('git')
source=("${_pkgname}::git+http://git.archlinux.org/users/remy/texlive-localmanager.git"
'tllocalmgr-2020.patch'
'tllocalmgr-enhance.patch'
- 'tllocalmgr-fix-texlive-local-match.patch')
+ 'tllocalmgr-fix-texlive-local-match.patch'
+ 'tllocalmgr-pkgs-nicer-error.patch')
sha256sums=('SKIP'
'cdd88b9d8b87fcd6117a3ef6c9dd69ac1103a15beb966d64f2ad1996b574a1f1'
'22222ff329919ee6a16ffd489b0213b14f8169d9daf6ef1a82aa5ab37538c236'
- 'a7698d0076f4e1a7ef401899c174ed9a290674a7e89e9c818ba078e17548c6e7')
+ 'a7698d0076f4e1a7ef401899c174ed9a290674a7e89e9c818ba078e17548c6e7'
+ '1538426adada826f8faeed826e9be5f5610ade23ce0437535e39662294e6e108')
pkgver() {
cd "$_pkgname"
@@ -50,6 +52,9 @@ prepare() {
# fix missing exclusion of matches for texlive local packages
# thanks: @CaptainBern
patch -p1 < "$srcdir/tllocalmgr-fix-texlive-local-match.patch"
+
+ # make error on missing 'pkgs' file non-fatal, improve error msg
+ patch -p1 < "$srcdir/tllocalmgr-pkgs-nicer-error.patch"
}
package() {
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>) {