diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2024-06-15 23:21:33 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2024-08-31 10:45:31 +0200 |
commit | 5cb3eaed1523b2fce3049d74744700132d724f19 (patch) | |
tree | c2b15ce15ae63e73559a4e9054d17098768dcf4b | |
parent | ae43ee7e0976dd54e5ca2cce7ab87dbf347e7c17 (diff) | |
download | guix-5cb3eaed1523b2fce3049d74744700132d724f19.tar.gz guix-5cb3eaed1523b2fce3049d74744700132d724f19.zip |
guix: import texlive: Remove `files-differ?' function.
* guix/import/texlive.scm (files-differ?): Remove no longer used function.
Change-Id: I472b628da779c187fd315a929546c8e9bcefdcd3
-rw-r--r-- | guix/import/texlive.scm | 41 |
1 files changed, 1 insertions, 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)) |