guix: Match package names case-insensitively.
* guix/scripts/package.scm (options->upgrade-predicate, process-query): Use REGEXP/ICASE when matching package names.
This commit is contained in:
parent
23dbe62158
commit
b56d160944
|
@ -6,6 +6,7 @@
|
||||||
;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
|
;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
|
||||||
;;; Copyright © 2016 Benz Schenk <benz.schenk@uzh.ch>
|
;;; Copyright © 2016 Benz Schenk <benz.schenk@uzh.ch>
|
||||||
;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com>
|
;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com>
|
||||||
|
;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -526,14 +527,14 @@ upgrading, #f otherwise."
|
||||||
(define upgrade-regexps
|
(define upgrade-regexps
|
||||||
(filter-map (match-lambda
|
(filter-map (match-lambda
|
||||||
(('upgrade . regexp)
|
(('upgrade . regexp)
|
||||||
(make-regexp* (or regexp "")))
|
(make-regexp* (or regexp "") regexp/icase))
|
||||||
(_ #f))
|
(_ #f))
|
||||||
opts))
|
opts))
|
||||||
|
|
||||||
(define do-not-upgrade-regexps
|
(define do-not-upgrade-regexps
|
||||||
(filter-map (match-lambda
|
(filter-map (match-lambda
|
||||||
(('do-not-upgrade . regexp)
|
(('do-not-upgrade . regexp)
|
||||||
(make-regexp* regexp))
|
(make-regexp* regexp regexp/icase))
|
||||||
(_ #f))
|
(_ #f))
|
||||||
opts))
|
opts))
|
||||||
|
|
||||||
|
@ -686,7 +687,7 @@ processed, #f otherwise."
|
||||||
#t)
|
#t)
|
||||||
|
|
||||||
(('list-installed regexp)
|
(('list-installed regexp)
|
||||||
(let* ((regexp (and regexp (make-regexp* regexp)))
|
(let* ((regexp (and regexp (make-regexp* regexp regexp/icase)))
|
||||||
(manifest (profile-manifest profile))
|
(manifest (profile-manifest profile))
|
||||||
(installed (manifest-entries manifest)))
|
(installed (manifest-entries manifest)))
|
||||||
(leave-on-EPIPE
|
(leave-on-EPIPE
|
||||||
|
@ -702,7 +703,7 @@ processed, #f otherwise."
|
||||||
#t))
|
#t))
|
||||||
|
|
||||||
(('list-available regexp)
|
(('list-available regexp)
|
||||||
(let* ((regexp (and regexp (make-regexp* regexp)))
|
(let* ((regexp (and regexp (make-regexp* regexp regexp/icase)))
|
||||||
(available (fold-available-packages
|
(available (fold-available-packages
|
||||||
(lambda* (name version result
|
(lambda* (name version result
|
||||||
#:key outputs location
|
#:key outputs location
|
||||||
|
|
Loading…
Reference in New Issue