ngz pushed a commit to branch tex-team in repository guix. commit 31d7adb9088c72425af17a9fe5436b6a644107c1 Author: Nicolas Goaziou <m...@nicolasgoaziou.fr> AuthorDate: Sat Jun 15 23:21:33 2024 +0200
guix: import texlive: Remove `files-differ?' function. * guix/import/texlive.scm (files-differ?): Remove no longer used function. Change-Id: I472b628da779c187fd315a929546c8e9bcefdcd3 --- guix/import/texlive.scm | 41 +---------------------------------------- 1 file changed, 1 insertion(+), 40 deletions(-) diff --git a/guix/import/texlive.scm b/guix/import/texlive.scm index fba31f7343..a87f1346b0 100644 --- a/guix/import/texlive.scm +++ b/guix/import/texlive.scm @@ -37,8 +37,7 @@ #:use-module (srfi srfi-11) #:use-module (srfi srfi-2) #:use-module (srfi srfi-26) - #:export (files-differ? - texlive->guix-package + #:export (texlive->guix-package texlive-recursive-import)) ;;; Commentary: @@ -346,44 +345,6 @@ extensions, and files without extension." (reverse scripts))) '())) -(define* (files-differ? directory package-name - #:key - (package-database tlpdb) - (type #false) - (direction 'missing)) - "Return a list of files in DIRECTORY that differ from the expected installed -files for PACKAGE-NAME according to the PACKAGE-DATABASE. By default all -files considered, but this can be restricted by setting TYPE to 'runfiles, -'docfiles, or 'srcfiles. The names of files that are missing from DIRECTORY -are returned; by setting DIRECTION to anything other than 'missing, the names -of those files are returned that are unexpectedly installed." - (define (strip-directory-prefix file-name) - (string-drop file-name (1+ (string-length directory)))) - (let* ((data (or (assoc-ref (package-database) package-name) - (error (format #false - "~a is not a valid package name in the TeX Live package database." - package-name)))) - (files (if type - (or (assoc-ref data type) (list)) - (append (or (assoc-ref data 'runfiles) (list)) - (or (assoc-ref data 'docfiles) (list)) - (or (assoc-ref data 'srcfiles) (list))))) - (existing (file-system-fold - (const #true) ;enter? - (lambda (path stat result) (cons path result)) ;leaf - (lambda (path stat result) result) ;down - (lambda (path stat result) result) ;up - (lambda (path stat result) result) ;skip - (lambda (path stat errno result) result) ;error - (list) - directory))) - (if (eq? direction 'missing) - (lset-difference string=? - files (map strip-directory-prefix existing)) - ;; List files that are installed but should not be. - (lset-difference string=? - (map strip-directory-prefix existing) files)))) - (define (files->locations files) (define (trim-filename entry) (string-join (drop-right (string-split entry #\/) 1) "/" 'suffix))