me
/
guix
Archived
1
0
Fork 0

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.
master
Ricardo Wurmus 2023-03-29 21:06:07 +02:00
parent b849a47bdb
commit 739c257378
No known key found for this signature in database
GPG Key ID: 197A5888235FACAC
1 changed files with 9 additions and 5 deletions

View File

@ -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