mirror of
https://codeberg.org/hako/Rosenthal.git
synced 2026-08-06 12:20:13 +00:00
bootloader: menu-entry->ukify-args: Avoid relative reference to system generations.
This commit is contained in:
parent
ed592c6c6e
commit
ecdb930021
@ -36,10 +36,10 @@
|
||||
old-entries))
|
||||
|
||||
(define labels
|
||||
(map-in-order menu-entry-label menu-entries))
|
||||
(map menu-entry-label menu-entries))
|
||||
|
||||
(define ukify-args
|
||||
(map-in-order menu-entry->ukify-args menu-entries))
|
||||
(map menu-entry->ukify-args menu-entries))
|
||||
|
||||
(program-file "install-limine"
|
||||
(with-imported-modules
|
||||
|
||||
@ -26,7 +26,25 @@
|
||||
#~(list "--os-release" #$label
|
||||
"--linux" #$linux
|
||||
"--initrd" #$initrd
|
||||
"--cmdline" (string-join (list #$@arguments))
|
||||
"--cmdline"
|
||||
(string-join
|
||||
(map (lambda (arg)
|
||||
;; Use absolute references to avoid stale system generation
|
||||
;; status.
|
||||
(if (or (string-prefix? "gnu.system=" arg)
|
||||
(string-prefix? "gnu.load=" arg))
|
||||
(let* ((split-arg (string-split arg #\=))
|
||||
(option (car split-arg))
|
||||
(value (cadr split-arg)))
|
||||
(string-join
|
||||
(list option
|
||||
(catch #t
|
||||
(lambda ()
|
||||
(readlink value))
|
||||
(const value)))
|
||||
"="))
|
||||
arg))
|
||||
(list #$@arguments)))
|
||||
"--stub"
|
||||
#$(file-append systemd-stub "/libexec/" (systemd-stub-name)))))
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user