import: texlive: Remove more specific entries with the same prefix.
* guix/import/texlive.scm (files->directories): Ensure that any more specific directory is removed if a parent directory is in the list of provided locations.
This commit is contained in:
parent
d689ca6f0d
commit
18bd4d12d7
1 changed files with 7 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2017, 2021 Ricardo Wurmus <rekado@elephly.net>
|
;;; Copyright © 2017, 2021, 2022 Ricardo Wurmus <rekado@elephly.net>
|
||||||
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
|
@ -197,11 +197,14 @@
|
||||||
(loop all current #false))))))))))))
|
(loop all current #false))))))))))))
|
||||||
|
|
||||||
(define (files->directories files)
|
(define (files->directories files)
|
||||||
|
(define name->parts (cut string-split <> #\/))
|
||||||
(map (cut string-join <> "/" 'suffix)
|
(map (cut string-join <> "/" 'suffix)
|
||||||
(delete-duplicates (map (lambda (file)
|
(delete-duplicates (map (lambda (file)
|
||||||
(drop-right (string-split file #\/) 1))
|
(drop-right (name->parts file) 1))
|
||||||
files)
|
(sort files string<))
|
||||||
equal?)))
|
;; Remove sub-directories, i.e. more specific
|
||||||
|
;; entries with the same prefix.
|
||||||
|
(lambda (x y) (every equal? x y)))))
|
||||||
|
|
||||||
(define (tlpdb->package name package-database)
|
(define (tlpdb->package name package-database)
|
||||||
(and-let* ((data (assoc-ref package-database name))
|
(and-let* ((data (assoc-ref package-database name))
|
||||||
|
|
Reference in a new issue