[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/06: system: Optionally limit the entries returned by profile-grub-ent
From: |
Ludovic Courtès |
Subject: |
04/06: system: Optionally limit the entries returned by profile-grub-entries. |
Date: |
Sun, 6 Nov 2016 17:13:58 +0000 (UTC) |
civodul pushed a commit to branch master
in repository guix.
commit aff7280a0b2fabd2657923fcce62332cd5629e7b
Author: Chris Marusich <address@hidden>
Date: Tue Nov 1 22:48:13 2016 -0700
system: Optionally limit the entries returned by profile-grub-entries.
* guix/scripts/system.scm (profile-grub-entries): Add an optional parameter
which allows the caller to limit the number of returned grub entries.
Signed-off-by: Ludovic Courtès <address@hidden>
---
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 eee4422..5bc40ed 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -366,8 +366,10 @@ it atomically, and then run OS's activation script."
(date->string (time-utc->date time)
"~Y-~m-~d ~H:~M")))
-(define* (profile-grub-entries #:optional (profile %system-profile))
- "Return a list of 'menu-entry' for the generations of PROFILE."
+(define* (profile-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"))
@@ -395,8 +397,7 @@ it atomically, and then run OS's activation script."
kernel-arguments))
(initrd 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
- branch master updated (f4dc22b -> 8074b33), Ludovic Courtès, 2016/11/06
- 01/06: system: Avoid using device paths in <menu-entry> device field., Ludovic Courtès, 2016/11/06
- 03/06: system: Rename previous-grub-entries to profile-grub-entries., Ludovic Courtès, 2016/11/06
- 04/06: system: Optionally limit the entries returned by profile-grub-entries.,
Ludovic Courtès <=
- 05/06: install: Extract procedure: install-grub-config., Ludovic Courtès, 2016/11/06
- 02/06: profiles: Extract a procedure for getting relative generation numbers., Ludovic Courtès, 2016/11/06
- 06/06: system: Add 'guix system' actions: switch-generation and roll-back., Ludovic Courtès, 2016/11/06