[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
97/137: guix: import texlive: Reduce friction when updating.
From: |
guix-commits |
Subject: |
97/137: guix: import texlive: Reduce friction when updating. |
Date: |
Mon, 24 Jun 2024 18:27:19 -0400 (EDT) |
ngz pushed a commit to branch tex-team
in repository guix.
commit d5e4ca148eaf64fb501e3be5024ab156ea379137
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
AuthorDate: Fri Jun 21 20:13:44 2024 +0200
guix: import texlive: Reduce friction when updating.
* guix/import/texlive.scm (no-bin-propagation-packages): Add more false
positives that do not need to propagate binaries.
(list-linked-scripts): Recognize ".sco" extension.
(list-upstream-inputs): Special case TEXLIVE-KPATHSEA, which should
propagate
TEXLIVE-LIBKPATHSEA, not TEXLIVE-KPATHSEA-BIN.
(texlive->svn-multi-reference):
(tlpdb->package): Special case URL for TEXLIVE-SCRIPTS.
Change-Id: Ib0954b42a4664184ab006b4c6ec9bdacd48c1646
---
guix/import/texlive.scm | 89 ++++++++++++++++++++++++++++++++++++-------------
1 file changed, 66 insertions(+), 23 deletions(-)
diff --git a/guix/import/texlive.scm b/guix/import/texlive.scm
index 5aae1c3d49..eb6262e140 100644
--- a/guix/import/texlive.scm
+++ b/guix/import/texlive.scm
@@ -73,22 +73,53 @@
"tex/generic/hyphen/"
"web2c/"))
-;; The following packages should propagate their binaries according to the TeX
-;; Live database, but won't because said binaries are already provided by
-;; "texlive-bin". As a consequence, the importer does not make them propagate
-;; their "-bin" counterpart.
+;; The following packages do not have any auxiliary "-bin" package to
+;; propagate, even if they do have a corresponding ".ARCH" entry in the TeX
+;; Live package database. They fall into 3 categories:
+;;
+;; 1. Associated entries in NAME.ARCH are already provided by TEXLIVE-BIN.
+;;
+;; 2. Associated entries in NAME.ARCH are symlinks to binaries provided by
+;; TEXLIVE-BIN.
+;;
+;; 3. They fool the (naive) algorithm for "-bin" propagation and generate
+;; false positives. This generally happens when the package creates multiple
+;; symlinks to a script it bundles.
(define no-bin-propagation-packages
- (list "cweb"
- "latex-bin"
- "luahbtex"
- "luatex"
- "metafont"
- "pdftex"
- "pdftosrc"
- "synctex"
- "tex"
- "tie"
- "web"))
+ (list
+ ;; Category 1.
+ "ctie"
+ "cweb"
+ "luahbtex"
+ "luatex"
+ "metafont"
+ "pdftex"
+ "pdftosrc"
+ "synctex"
+ "tex"
+ "tie"
+ "web"
+ ;; Category 2.
+ "amstex"
+ "csplain"
+ "eplain"
+ "jadetex"
+ "latex-bin"
+ "lollipop"
+ "mex"
+ "mltex"
+ "optex"
+ "platex"
+ "uplatex"
+ "texsis"
+ "xmltex"
+ ;; Category 3.
+ "biber"
+ "context"
+ "cluttex"
+ "esptopdf"
+ "pdfcrop"
+ "texdef"))
;; Guix introduces two specific packages based on TEXLIVE-BUILD-SYSTEM. Add
;; an entry for them in the package database, so they can be imported, and
@@ -468,8 +499,8 @@ association list."
(define (list-linked-scripts name package-database)
"Return a list of script names to symlink from \"bin/\" directory for
package NAME according to PACKAGE-DATABASE. Consider as scripts files with
-\".lua\", \".pl\", \".py\", \".rb\", \".sh\", \".tcl\", \".texlua\", \".tlu\"
-extensions, and files without extension."
+\".lua\", \".pl\", \".py\", \".rb\", \".sh\", \".sno\", \".tcl\", \".texlua\",
+\".tlu\" extensions, and files without extension."
(or (and-let* ((data (assoc-ref package-database name))
;; List scripts candidates. Bail out if there are none.
(runfiles (assoc-ref data 'runfiles))
@@ -480,8 +511,8 @@ extensions, and files without extension."
(filter-map (lambda (script)
(and (any (lambda (ext)
(member (basename script ext) binfiles))
- '(".lua" ".pl" ".py" ".rb" ".sh" ".tcl"
".texlua"
- ".tlu"))
+ '(".lua" ".pl" ".py" ".rb" ".sh" ".sno" ".tcl"
+ ".texlua" ".tlu"))
(basename script)))
;; Get the right (alphabetic) order.
(reverse scripts)))
@@ -550,7 +581,11 @@ of package with UPSTREAM-NAME in VERSION."
(if (and (> (length binfiles) (length scripts))
(not (member upstream-name
no-bin-propagation-packages)))
- (list (string-append upstream-name "-bin"))
+ ;; LIBKPATHSEA contains the executables for KPATHSEA.
+ ;; There is no KPATHSEA-BIN.
+ (list (if (equal? upstream-name "kpathsea")
+ "libkpathsea"
+ (string-append upstream-name "-bin")))
'()))
string<?))))))
@@ -585,11 +620,12 @@ at VERSION."
(files (append (or (assoc-ref data 'docfiles) (list))
(or (assoc-ref data 'runfiles) (list))
(or (assoc-ref data 'srcfiles) (list))))
+ (texlive-scripts? (equal? upstream-name "scripts"))
(locations
;; Drop "texmf-dist/" prefix from files. Special case
;; TEXLIVE-SCRIPTS, where files are split across "tlpkg/" and
;; "texmf-dist/".
- (if (equal? upstream-name "scripts")
+ (if texlive-scripts?
files
(files->locations
;; Ignore any file not starting with the expected prefix, such
@@ -600,7 +636,10 @@ at VERSION."
(string-drop file (string-length "texmf-dist/"))))
files)))))
(svn-multi-reference
- (url (texlive-packages-repository version))
+ (url (if texlive-scripts?
+ (string-append
+ %texlive-repository "tags/texlive-" version "/Master")
+ (texlive-packages-repository version)))
(locations (sort locations string<))
(revision (assoc-ref database 'database-revision)))))
@@ -628,7 +667,11 @@ at VERSION."
`(origin
(method svn-multi-fetch)
(uri (svn-multi-reference
- (url (texlive-packages-repository version))
+ (url
+ ,(if (equal? upstream-name "scripts")
+ '(string-append %texlive-repository
+ "tags/texlive-" version
"/Master/")
+ '(texlive-packages-repository version)))
(revision ,(svn-multi-reference-revision reference))
(locations
(list ,@(svn-multi-reference-locations
reference)))))
- 55/137: gnu: Add texlive-dvisvgm-bin., (continued)
- 55/137: gnu: Add texlive-dvisvgm-bin., guix-commits, 2024/06/24
- 57/137: gnu: Add texlive-lacheck-bin., guix-commits, 2024/06/24
- 60/137: gnu: Add texlive-t1utils-bin., guix-commits, 2024/06/24
- 68/137: gnu: texlive-ps2pk: Build binaries separately., guix-commits, 2024/06/24
- 70/137: gnu: texlive-musixtnt: Build binary separately., guix-commits, 2024/06/24
- 90/137: gnu: texlive-scripts: Allow auto-updates., guix-commits, 2024/06/24
- 89/137: gnu: TeX Live packages built from TEXLIVE-SOURCE use same version., guix-commits, 2024/06/24
- 94/137: gnu: Remove artefacts from previous TeX Live packaging., guix-commits, 2024/06/24
- 95/137: gnu: texlive-scripts: Add missing file name for checkout., guix-commits, 2024/06/24
- 96/137: guix: import texlive: Adjust to generate new source format., guix-commits, 2024/06/24
- 97/137: guix: import texlive: Reduce friction when updating.,
guix-commits <=
- 104/137: gnu: texlive-psfragx: Remove native inputs., guix-commits, 2024/06/24
- 105/137: gnu: texlive-texaccents: Add missing script., guix-commits, 2024/06/24
- 107/137: gnu: texlive-cluttex: Add "cllualatex" and "clxelatex" symlinks., guix-commits, 2024/06/24
- 59/137: gnu: Add texlive-ps2eps-bin., guix-commits, 2024/06/24
- 61/137: gnu: texlive-texdoctk: Fix runtime error., guix-commits, 2024/06/24
- 64/137: gnu: Add texlive-xml2pmx-bin., guix-commits, 2024/06/24
- 67/137: gnu: texlive-dviout-util: Build binaries separately., guix-commits, 2024/06/24
- 79/137: gnu: python-sphinx: Fix build., guix-commits, 2024/06/24
- 72/137: gnu: texlive-xindy: Build binary separately., guix-commits, 2024/06/24
- 76/137: gnu: texlive-xits: Fix typo in description., guix-commits, 2024/06/24