mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
glob: Add an extra glob pattern compilation stage.
* guix/glob.scm (compile-glob-pattern): Rename to... (string->sglob): ... this. (compile-sglob, string->compiled-sglob): New procedures. (glob-match?): Replace '?, 'range, and 'set with a single clause. * tests/glob.scm (test-compile-glob-pattern): Rename to... (test-string->sglob): ... this. Adjust accordingly. (test-glob-match): Use 'string->compiled-sglob' instead of 'compile-glob-pattern'. * gnu/build/linux-modules.scm (read-module-aliases): Use 'string->compiled-sglob' instead of 'compile-glob-pattern'.
This commit is contained in:
parent
e914b398af
commit
71e08fde28
3 changed files with 41 additions and 26 deletions
|
@ -329,7 +329,7 @@ The modules corresponding to these aliases can then be found using
|
|||
list of alias/module pairs where each alias is a glob pattern as like the
|
||||
result of:
|
||||
|
||||
(compile-glob-pattern \"scsi:t-0x01*\")
|
||||
(string->compiled-sglob \"scsi:t-0x01*\")
|
||||
|
||||
and each module is a module name like \"snd_hda_intel\"."
|
||||
(define (comment? str)
|
||||
|
@ -354,7 +354,7 @@ and each module is a module name like \"snd_hda_intel\"."
|
|||
(line
|
||||
(match (tokenize line)
|
||||
(("alias" alias module)
|
||||
(loop (alist-cons (compile-glob-pattern alias) module
|
||||
(loop (alist-cons (string->compiled-sglob alias) module
|
||||
aliases)))
|
||||
(() ;empty line
|
||||
(loop aliases)))))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue