From 6ec4881a1bd19052db633adec3bedbac0f4bc21a Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Sat, 18 Jan 2020 20:47:35 +0000 Subject: TeXLive version printing updated to include revision Until now, when find the versions of the TeXLive packages, we would assume that `cat-date' is always present (because some packages don't have a version!). However, apparently an update has been made in the TeXLive Manager (`tlmgr') and `cat-date' is no longer present! As a result, none of the TeXLive packages were being printed. With this commit, it now assumes that `revision' is always present for every package, but it also attempts to read `cat-date' (for backwards compatability). When `cat-version' isn't present, it will try printing `revision' and if that is also not present, it will print the date. --- reproduce/software/make/high-level.mk | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) (limited to 'reproduce/software/make/high-level.mk') diff --git a/reproduce/software/make/high-level.mk b/reproduce/software/make/high-level.mk index f46480a..735a24a 100644 --- a/reproduce/software/make/high-level.mk +++ b/reproduce/software/make/high-level.mk @@ -1220,13 +1220,32 @@ $(itidir)/texlive: reproduce/software/config/installation/texlive.mk \ texlive=$$(pdflatex --version | awk 'NR==1' | sed 's/.*(\(.*\))/\1/' \ | awk '{print $$NF}'); - # Package names and versions. - rm -f $@ + # Package names and versions. Note that all TeXLive packages + # don't have a version unfortunately! So we need to also read the + # `revision' and `cat-date' elements and print them incase + # version isn't available. tlmgr info $(texlive-packages) --only-installed | awk \ - '$$1=="package:" {version=0; \ - if($$NF=="tex-gyre") name="texgyre"; \ - else name=$$NF} \ + '$$1=="package:" { \ + if(name!=0) \ + { \ + if(version=="") \ + { \ + if(revision=="") \ + { \ + if(date="") printf("%s (no version)\n", name); \ + else printf("%s %s (date)\n", name, date); \ + } \ + else + printf("%s %s (revision)\n", name, revision); \ + } \ + else \ + printf("%s %s\n", name, version); \ + } \ + name=""; version=""; revision=""; date=""; \ + if($$NF=="tex-gyre") name="texgyre"; \ + else name=$$NF \ + } \ + $$1=="cat-date:" {date=$$NF} \ $$1=="cat-version:" {version=$$NF} \ - $$1=="cat-date:" {if(version==0) version=$$2; \ - printf("%s %s\n", name, version)}' >> $@ + $$1=="revision:" {revision=$$NF}' > $@ fi -- cgit v1.2.1