system: 'kernel->boot-label' now accepts inferior packages.
* gnu/system.scm (kernel->boot-label): Get package name and version using the functions for inferior packages if the kernel is an inferior package. Return "GNU" if the kernel is not a package. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
4b33a74138
commit
bdc61ff97d
|
@ -21,6 +21,7 @@
|
||||||
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
(define-module (gnu system)
|
(define-module (gnu system)
|
||||||
|
#:use-module (guix inferior)
|
||||||
#:use-module (guix store)
|
#:use-module (guix store)
|
||||||
#:use-module (guix monads)
|
#:use-module (guix monads)
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
|
@ -905,10 +906,17 @@ listed in OS. The C library expects to find it under
|
||||||
|
|
||||||
(define (kernel->boot-label kernel)
|
(define (kernel->boot-label kernel)
|
||||||
"Return a label for the bootloader menu entry that boots KERNEL."
|
"Return a label for the bootloader menu entry that boots KERNEL."
|
||||||
|
(cond ((package? kernel)
|
||||||
(string-append "GNU with "
|
(string-append "GNU with "
|
||||||
(string-titlecase (package-name kernel)) " "
|
(string-titlecase (package-name kernel)) " "
|
||||||
(package-version kernel)
|
(package-version kernel)
|
||||||
" (beta)"))
|
" (beta)"))
|
||||||
|
((inferior-package? kernel)
|
||||||
|
(string-append "GNU with "
|
||||||
|
(string-titlecase (inferior-package-name kernel))
|
||||||
|
(inferior-package-version kernel)
|
||||||
|
" (beta)"))
|
||||||
|
(else "GNU")))
|
||||||
|
|
||||||
(define (store-file-system file-systems)
|
(define (store-file-system file-systems)
|
||||||
"Return the file system object among FILE-SYSTEMS that contains the store."
|
"Return the file system object among FILE-SYSTEMS that contains the store."
|
||||||
|
|
Loading…
Reference in New Issue