guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: installer: Simplify time zone dir handling and keymap dir handlin


From: Danny Milosavljevic
Subject: 01/02: installer: Simplify time zone dir handling and keymap dir handling.
Date: Sun, 9 Jul 2017 20:25:14 -0400 (EDT)

dannym pushed a commit to branch wip-installer-2
in repository guix.

commit ee24098b606205ea6280976d9cea77bd854717b4
Author: Danny Milosavljevic <address@hidden>
Date:   Mon Jul 10 02:12:22 2017 +0200

    installer: Simplify time zone dir handling and keymap dir handling.
    
    * gnu/system/installer/guixsd-installer.scm (base-page-key-handler): Modify.
    * gnu/system/installer/time-zone.scm (time-zone-page-activate-item):
    Don't add slashes twice.
    * gnu/system/installer/key-map.scm (key-map-page-activate-item):
    Don't add slashes twice.
---
 gnu/system/installer/guixsd-installer.scm | 24 ++++++++++++------------
 gnu/system/installer/key-map.scm          |  2 +-
 gnu/system/installer/time-zone.scm        |  2 +-
 3 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/gnu/system/installer/guixsd-installer.scm 
b/gnu/system/installer/guixsd-installer.scm
index c09c557..675abc3 100644
--- a/gnu/system/installer/guixsd-installer.scm
+++ b/gnu/system/installer/guixsd-installer.scm
@@ -115,11 +115,11 @@
                             (lambda (page)
                               (make-tz-browser
                                page
-                               (or
-                                (getenv "TZDIR")
-                                (string-append (car (slurp** (page-surface 
page)
-                                                             "guix" "build" 
"tzdata"))
-                                                 "/share/zoneinfo"))))))
+                               (string-append (or (getenv "TZDIR")
+                                                  (string-append
+                                                   (car (slurp** (page-surface 
page)
+                                                                 "guix" 
"build" "tzdata"))
+                                                   "/share/zoneinfo/")) 
"/")))))
 
     (hostname . ,(make-task hostname-menu-title
                             '()
@@ -188,13 +188,13 @@
        (let* ((keymap-directory
                (string-append (dirname loadkeys-directory) "/../share/keymaps"
                               (match (utsname:machine (uname))
-                                ("i686" "/i386")
-                                ("x86_64" "/i386")
-                                ("aarch64" "/i386")
-                                ("armv7l" "/i386")
-                                ("powerpc" "/ppc")
-                                ("ppc64" "/ppc")
-                                (_ ""))))
+                                ("i686" "/i386/")
+                                ("x86_64" "/i386/")
+                                ("aarch64" "/i386/")
+                                ("armv7l" "/i386/")
+                                ("powerpc" "/ppc/")
+                                ("ppc64" "/ppc/")
+                                (_ "/"))))
               (p (make-key-map
                   page keymap-directory)))
          (page-enter p)))))))
diff --git a/gnu/system/installer/key-map.scm b/gnu/system/installer/key-map.scm
index 0c11922..27cc1e0 100644
--- a/gnu/system/installer/key-map.scm
+++ b/gnu/system/installer/key-map.scm
@@ -46,7 +46,7 @@
   (match item
    (('menu-item-activated i)
     (let* ((directory (page-datum page 'directory))
-           (new-dir (string-append directory "/" i)))
+           (new-dir (string-append directory i)))
       (if (eq? 'directory (stat:type (stat new-dir)))
         (let ((p (make-key-map page new-dir)))
           (page-pop) ; Don't go back to the current page!
diff --git a/gnu/system/installer/time-zone.scm 
b/gnu/system/installer/time-zone.scm
index 926f55f..3957d29 100644
--- a/gnu/system/installer/time-zone.scm
+++ b/gnu/system/installer/time-zone.scm
@@ -47,7 +47,7 @@
    (('menu-item-activated i)
       (time-zone-page-refresh page) ; FIXME remove
       (let* ((directory (page-datum page 'directory))
-             (new-dir (string-append directory "/" i))
+             (new-dir (string-append directory i))
              (st (lstat new-dir)))
         (if (and (file-exists? new-dir)
                  (eq? 'directory (stat:type st)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]