[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
08/08: import/texlive: tlpdb->package: Ignore files outside of texmf-dis
From: |
guix-commits |
Subject: |
08/08: import/texlive: tlpdb->package: Ignore files outside of texmf-dist. |
Date: |
Wed, 29 Mar 2023 15:08:45 -0400 (EDT) |
rekado pushed a commit to branch master
in repository guix.
commit 739c257378239c3b4eb73d0b7cc05dd7a5c5f823
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Wed Mar 29 21:06:07 2023 +0200
import/texlive: tlpdb->package: Ignore files outside of texmf-dist.
* guix/import/texlive.scm (tlpdb->package): Ignore files outside of
texmf-dist
because the code assumes that this is the prefix for all files.
---
guix/import/texlive.scm | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/guix/import/texlive.scm b/guix/import/texlive.scm
index 17c17f690c..81f9177443 100644
--- a/guix/import/texlive.scm
+++ b/guix/import/texlive.scm
@@ -246,11 +246,15 @@ of those files are returned that are unexpectedly
installed."
(define (tlpdb->package name version package-database)
(and-let* ((data (assoc-ref package-database name))
(dirs (files->directories
- (map (lambda (dir)
- (string-drop dir (string-length "texmf-dist/")))
- (append (or (assoc-ref data 'docfiles) (list))
- (or (assoc-ref data 'runfiles) (list))
- (or (assoc-ref data 'srcfiles) (list))))))
+ (filter-map (lambda (dir)
+ ;; Ignore any file not starting with the
+ ;; expected prefix. Nothing good can come
+ ;; from this.
+ (and (string-prefix? "texmf-dist/" dir)
+ (string-drop dir (string-length
"texmf-dist/"))))
+ (append (or (assoc-ref data 'docfiles) (list))
+ (or (assoc-ref data 'runfiles) (list))
+ (or (assoc-ref data 'srcfiles)
(list))))))
(name (guix-name name))
;; TODO: we're ignoring the VERSION argument because that
;; information is distributed across %texlive-tag and
- branch master updated (cd31437e9c -> 739c257378), guix-commits, 2023/03/29
- 02/08: gnu: Add texlive-dvipdfmx., guix-commits, 2023/03/29
- 01/08: gnu: Add texlive-glyphlist., guix-commits, 2023/03/29
- 07/08: import/texlive: Process license field only when it exists., guix-commits, 2023/03/29
- 03/08: gnu: Add texlive-firstaid., guix-commits, 2023/03/29
- 05/08: import/texlive: Ignore architecture-dependent packages., guix-commits, 2023/03/29
- 04/08: gnu: Add texlive-xetex., guix-commits, 2023/03/29
- 06/08: import/texlive: Only process description if it exists., guix-commits, 2023/03/29
- 08/08: import/texlive: tlpdb->package: Ignore files outside of texmf-dist.,
guix-commits <=