From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50619) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d1XSy-0000O6-NU for guix-patches@gnu.org; Fri, 21 Apr 2017 08:15:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d1XSs-0004XC-ES for guix-patches@gnu.org; Fri, 21 Apr 2017 08:15:12 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:33524) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d1XSs-0004Wy-Am for guix-patches@gnu.org; Fri, 21 Apr 2017 08:15:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d1XSs-000339-4o for guix-patches@gnu.org; Fri, 21 Apr 2017 08:15:06 -0400 Subject: bug#26544: [PATCH v3 9/9] scripts: Remove profile-grub-entries. Resent-Message-ID: From: Danny Milosavljevic Date: Fri, 21 Apr 2017 14:14:42 +0200 Message-Id: <20170421121442.29972-10-dannym@scratchpost.org> In-Reply-To: <20170421121442.29972-1-dannym@scratchpost.org> References: <86h91ikw4m.fsf@gmail.com> <20170421121442.29972-1-dannym@scratchpost.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 26544@debbugs.gnu.org * guix/scripts/system.scm (profile-grub-entries): Delete variable. --- guix/scripts/system.scm | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index 242bd8074..3feccb2ab 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -384,43 +384,6 @@ NUMBERS, which is a list of generation numbers." systems))) (filter-map system->boot-parameters systems numbers times))) -(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* ((params (read-boot-parameters-file system)) - (label (boot-parameters-label params)) - (root (boot-parameters-root-device params)) - (root-device (if (bytevector? root) - (uuid->string root) - root)) - (kernel (boot-parameters-kernel params)) - (kernel-arguments (boot-parameters-kernel-arguments params)) - (initrd (boot-parameters-initrd params))) - (menu-entry - (label (string-append label " (#" - (number->string number) ", " - (seconds->string time) ")")) - (device (boot-parameters-store-device params)) - (device-mount-point (boot-parameters-store-mount-point params)) - (linux kernel) - (linux-arguments - (cons* (string-append "--root=" root-device) - (string-append "--system=" system) - (string-append "--load=" system "/boot") - kernel-arguments)) - (initrd initrd))))) - - (let* ((systems (map (cut generation-file-name profile <>) - numbers)) - (times (map (lambda (system) - (unless-file-not-found - (stat:mtime (lstat system)))) - systems))) - (filter-map system->grub-entry systems numbers times))) - ;;; ;;; Roll-back.