summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans-Nikolai Viessmann2021-10-26 20:43:24 +0200
committerXZS2022-09-13 14:08:14 +0200
commit98b2e63890b87d96078026911cfff4ad2b51d70c (patch)
tree07c7cef960d020ceaffc9784962a2f2e59331cd5
parent74ac9e86163104eea6f4a5ce5e5f3dba03484340 (diff)
downloadaur-98b2e63890b87d96078026911cfff4ad2b51d70c.tar.gz
improve error handling
* we now ignore any missing pkgs file, instead issueing a warning to the user to check upstream to have this fixed * we also properly check that a package actually exists in the tlpdb *before* trying to read its metadata.
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD4
-rw-r--r--tllocalmgr-pkgs-nicer-error.patch33
3 files changed, 33 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f2a5f47541d9..2a8a6fc62534 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 = r84.bbd8488
- pkgrel = 3
+ pkgrel = 4
url = https://gitlab.archlinux.org/remy/texlive-localmanager.git
arch = any
license = GPL
@@ -25,7 +25,7 @@ pkgbase = texlive-localmanager-git
sha256sums = cd12f1927fa9d950855aab91b30039d0cbb328a8c7899382286d3ace16bb6a3b
sha256sums = 22222ff329919ee6a16ffd489b0213b14f8169d9daf6ef1a82aa5ab37538c236
sha256sums = a7698d0076f4e1a7ef401899c174ed9a290674a7e89e9c818ba078e17548c6e7
- sha256sums = 1538426adada826f8faeed826e9be5f5610ade23ce0437535e39662294e6e108
+ sha256sums = 23f103c606eb595d8c114aee2ca3006a09588370087b959419f86a4a8ce25a43
sha256sums = d7064657f6336bed7be230fc05df800e6bdcee31d10c718b4b9b1b55f7f26c8a
pkgname = texlive-localmanager-git
diff --git a/PKGBUILD b/PKGBUILD
index 95bf6f0e425b..9916572d6d5e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,7 +7,7 @@
pkgname=texlive-localmanager-git
_pkgname="${pkgname%-git}"
pkgver=r84.bbd8488
-pkgrel=3
+pkgrel=4
pkgdesc='A shell and command-line utility to manage TeXLive on Arch Linux'
arch=('any')
url='https://gitlab.archlinux.org/remy/texlive-localmanager.git'
@@ -33,7 +33,7 @@ sha256sums=('SKIP'
'cd12f1927fa9d950855aab91b30039d0cbb328a8c7899382286d3ace16bb6a3b'
'22222ff329919ee6a16ffd489b0213b14f8169d9daf6ef1a82aa5ab37538c236'
'a7698d0076f4e1a7ef401899c174ed9a290674a7e89e9c818ba078e17548c6e7'
- '1538426adada826f8faeed826e9be5f5610ade23ce0437535e39662294e6e108'
+ '23f103c606eb595d8c114aee2ca3006a09588370087b959419f86a4a8ce25a43'
'd7064657f6336bed7be230fc05df800e6bdcee31d10c718b4b9b1b55f7f26c8a')
pkgver() {
diff --git a/tllocalmgr-pkgs-nicer-error.patch b/tllocalmgr-pkgs-nicer-error.patch
index 8b528763cf6a..eaca84219081 100644
--- a/tllocalmgr-pkgs-nicer-error.patch
+++ b/tllocalmgr-pkgs-nicer-error.patch
@@ -1,14 +1,39 @@
---- a/tllocalmgr 2020-12-02 16:46:49.214712042 +0100
-+++ b/tllocalmgr 2020-12-02 17:05:02.476194535 +0100
-@@ -171,7 +171,10 @@
+--- a/tllocalmgr 2021-10-26 20:36:35.893293400 +0200
++++ b/tllocalmgr 2021-10-26 20:37:50.127537318 +0200
+@@ -171,7 +171,13 @@
$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 RED "-- Likely the package texlive-$col does not create the '*.pkgs' file.\n";
++ print RED "-- We will not process it further; please contact upstream maintainer\n";
++ print RED "-- to have this fixed.\n";
++ delete $installedcol_versions{$col};
+ print LOG "Cannot open $INSTALLEDPKGS/texlive-$col\_$ver.pkgs!\n";
+ next;
};
open INST, "<$INSTALLEDPKGS/texlive-$col\_$ver.pkgs" ;
while (<INST>) {
+@@ -415,6 +421,10 @@
+ sub run_install {
+ foreach (@_) {
+ my $tlpkg = $tlpdb->get_package($_);
++ if (! $tlpkg) {
++ warning "$_ is unknown" ;
++ next ;
++ }
+ my $pkgrev = $tlpkg->revision;
+ if ( $locallyinstalledpkg_versions{$_} ) {
+ echo "$_ is already installed with texlive-local-$_";
+@@ -451,6 +461,10 @@
+ sub run_installdoc {
+ foreach (@_) {
+ my $tlpkg = $tlpdb->get_package($_);
++ if (! $tlpkg) {
++ warning "$_ is unknown" ;
++ next ;
++ }
+ my $pkgrev = $tlpkg->revision;
+ if ( $locallyinstalleddoc_versions{$_} ) {
+ echo "$_ is already installed with texlive-local-$_-doc";