diff --git a/modules/rosenthal/bootloader/limine.scm b/modules/rosenthal/bootloader/limine.scm index caa1d2f..bf63290 100644 --- a/modules/rosenthal/bootloader/limine.scm +++ b/modules/rosenthal/bootloader/limine.scm @@ -59,11 +59,11 @@ ;; Install unified kernel images and generate Limine configuration. (call-with-output-file (in-vicinity limine-directory "limine.conf.tmp") (lambda (port) - (let* ((ukify #$(file-append ukify "/bin/ukify")) - (current-label (first '#$labels)) - (current-args (first (list #$@ukify-args))) - (old-labels (cdr '#$labels)) - (old-args (cdr (list #$@ukify-args)))) + (let ((ukify #$(file-append ukify "/bin/ukify")) + (current-label (first '#$labels)) + (current-args (first (list #$@ukify-args))) + (old-labels (cdr '#$labels)) + (old-args (cdr (list #$@ukify-args)))) (format port "\ timeout: 5~%") (with-directory-excursion guix-directory @@ -78,30 +78,29 @@ timeout: 5~%") (unless (null? old-labels) (format port " /GNU system, old configurations...~%")) - (false-if-exception - (let loop ((count 1) - (labels old-labels) - (args old-args)) - (let* ((image-name (format #f "OLD-~a.EFI" count))) - (unless (null? labels) - (with-exception-handler - (lambda _ - (delete-file image-name) - ;; Exit loop. - (loop 0 '() '())) - (lambda () - (apply invoke/quiet - ukify "build" "--output" image-name - (first args)) - (format port "~ + (let loop ((count 1) + (labels old-labels) + (args old-args)) + (let ((image-name (format #f "OLD-~a.EFI" count))) + (unless (null? labels) + (catch #t + (lambda () + (apply invoke/quiet + ukify "build" "--output" image-name + (first args)) + (format port "~ //~a protocol: efi path: boot():/EFI/Guix/OLD-~a.EFI~%" - (first labels) - count))) - (loop (1+ count) - (cdr labels) - (cdr args)))))))) + (first labels) + count)) + (lambda _ + (delete-file image-name) + ;; Exit loop. + (loop 0 '() '()))) + (loop (1+ count) + (cdr labels) + (cdr args))))))) (rename-file (in-vicinity limine-directory "limine.conf.tmp") (in-vicinity limine-directory "limine.conf")) ;; Finally, install Limine.