From 059e79ab26f5e8ee60b60f5df01907300346c8e2 Mon Sep 17 00:00:00 2001 From: Chris Marusich Date: Thu, 28 Jul 2016 02:31:38 -0700 Subject: [PATCH 8/9] grub-entries: take a list of numbers on input --- guix/scripts/system.scm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index 25a7743..f450c9a 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -370,8 +370,10 @@ it atomically, and then run OS's activation script." (date->string (time-utc->date time) "~Y-~m-~d ~H:~M"))) -(define* (grub-entries #:optional (profile %system-profile)) - "Return a list of 'menu-entry' for the generations of PROFILE." +(define* (grub-entries #:optional (profile %system-profile) + (numbers (generation-numbers profile))) + "Return a list of 'menu-entry' for the generations of PROFILE specified by +NUMBERS, which is a list of generation numbers." (define (system->grub-entry system number time) (unless-file-not-found (let* ((file (string-append system "/parameters")) @@ -396,8 +398,7 @@ it atomically, and then run OS's activation script." kernel-arguments)) (initrd #~(string-append #$system "/initrd")))))) - (let* ((numbers (generation-numbers profile)) - (systems (map (cut generation-file-name profile <>) + (let* ((systems (map (cut generation-file-name profile <>) numbers)) (times (map (lambda (system) (unless-file-not-found -- 2.9.2