[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
97/141: guix: import texlive: Reduce friction when updating.
From: |
guix-commits |
Subject: |
97/141: guix: import texlive: Reduce friction when updating. |
Date: |
Wed, 26 Jun 2024 06:34:29 -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)))))
- 91/141: gnu: texlive-scripts: Fix typo in description., (continued)
- 91/141: gnu: texlive-scripts: Fix typo in description., guix-commits, 2024/06/26
- 95/141: gnu: texlive-scripts: Add missing file name for checkout., guix-commits, 2024/06/26
- 88/141: gnu: Set version of all TeX Live packages to "2023.0"., guix-commits, 2024/06/26
- 96/141: guix: import texlive: Adjust to generate new source format., guix-commits, 2024/06/26
- 94/141: gnu: Remove artefacts from previous TeX Live packaging., guix-commits, 2024/06/26
- 101/141: gnu: texlive-newverbs: Do not create origin for "ydocstrip.tex"., guix-commits, 2024/06/26
- 93/141: gnu: Refactor TeX Live packages to refer to SVN directly., guix-commits, 2024/06/26
- 98/141: gnu: Do not create origins for "ctxdocstrip.tex"., guix-commits, 2024/06/26
- 102/141: gnu: texlive-makecmds: Remove unnecessary input., guix-commits, 2024/06/26
- 104/141: gnu: texlive-psfragx: Remove native inputs., guix-commits, 2024/06/26
- 97/141: guix: import texlive: Reduce friction when updating.,
guix-commits <=
- 105/141: gnu: texlive-texaccents: Add missing script., guix-commits, 2024/06/26
- 103/141: gnu: texlive-dotseqn: Remove native input., guix-commits, 2024/06/26
- 99/141: gnu: texlive-metafont: Fix inputs., guix-commits, 2024/06/26
- 100/141: gnu: texlive-luatex: Remove unnecessary native input., guix-commits, 2024/06/26
- 107/141: gnu: texlive-cluttex: Add "cllualatex" and "clxelatex" symlinks., guix-commits, 2024/06/26
- 106/141: gnu: texlive-pdfcrop. Add "rpdfcrop" symlink., guix-commits, 2024/06/26
- 108/141: gnu: texlive-blockdraw-mp: Specify upstream name., guix-commits, 2024/06/26
- 109/141: gnu: texlive-kfsh-nat: Specify upstream name., guix-commits, 2024/06/26
- 110/141: gnu: tex: Set properties to protect inputs during updates., guix-commits, 2024/06/26
- 113/141: guix: download-multi-svn-to-store: Allow exporting from base URL., guix-commits, 2024/06/26