aboutsummaryrefslogtreecommitdiff
path: root/reproduce/software/make
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2020-01-18 20:47:35 +0000
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2020-01-18 20:47:35 +0000
commit6ec4881a1bd19052db633adec3bedbac0f4bc21a (patch)
tree4af8419211cb6311896cf27d32ec02817c4394e7 /reproduce/software/make
parent3c05235a86bb19e74a4ffb656b909928bdfc2126 (diff)
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.
Diffstat (limited to 'reproduce/software/make')
-rw-r--r--reproduce/software/make/high-level.mk33
1 files changed, 26 insertions, 7 deletions
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