[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
20/197: installer: Return slurped lines in their correct order.
From: |
Danny Milosavljevic |
Subject: |
20/197: installer: Return slurped lines in their correct order. |
Date: |
Mon, 3 Jul 2017 20:36:53 -0400 (EDT) |
dannym pushed a commit to branch wip-installer-2
in repository guix.
commit 71d7ad5285ccdefaefab959ecdc335cb128179d4
Author: John Darrington <address@hidden>
Date: Fri Dec 23 08:26:14 2016 +0100
installer: Return slurped lines in their correct order.
* gnu/system/installer/network.scm (network-page-init): Remove first member
from
lspci results.
* gnu/system/installer/utils.scm (slurp-real): Reverse the list before
returning.
---
gnu/system/installer/network.scm | 12 +++++++++---
gnu/system/installer/utils.scm | 2 +-
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/gnu/system/installer/network.scm b/gnu/system/installer/network.scm
index ab8add3..da8d959 100644
--- a/gnu/system/installer/network.scm
+++ b/gnu/system/installer/network.scm
@@ -151,9 +151,15 @@
((_ . (_ . (n . _)))
(string->number n 10)) (_ 0))))
(car (assoc-ref
- (slurp (format #f "lspci -vm -s~x:~x.~x" bus device
func)
- (lambda (x)
- (string-split x #\tab)))
+ (cdr
+ ;; It seems that lspci always prints an initial
+ ;; "Device: <bus>:<device>.<func> line. We are not
+ ;; interested in this, and it conflicts with the
"real"
+ ;; (descriptive) Device: line which we want. Hence
+ ;; the above cdr strips the first line away.
+ (slurp (format #f "lspci -vm -s~x:~x.~x" bus device
func)
+ (lambda (x)
+ (string-split x #\tab))))
"Device:")))))))
diff --git a/gnu/system/installer/utils.scm b/gnu/system/installer/utils.scm
index 3aa2bc8..5ea4964 100644
--- a/gnu/system/installer/utils.scm
+++ b/gnu/system/installer/utils.scm
@@ -178,7 +178,7 @@ which will process each string before returning it."
(let lp ((line-list '()))
(let ((l (read-line port)))
(if (eof-object? l)
- line-list
+ (reverse line-list)
(lp (cons (if proc (proc l) l) line-list))))))
- 11/197: installer: Change "interfaces" from a variable to a procedure., (continued)
- 11/197: installer: Change "interfaces" from a variable to a procedure., Danny Milosavljevic, 2017/07/03
- 16/197: installer: Add new procedure to get the list of volumes., Danny Milosavljevic, 2017/07/03
- 15/197: installer: Use %default-subsitute-urls instead of our own variable., Danny Milosavljevic, 2017/07/03
- 19/197: installer: Remove unused procedure., Danny Milosavljevic, 2017/07/03
- 18/197: installer: Handle the 'back' action in the filesystems task., Danny Milosavljevic, 2017/07/03
- 13/197: installer: Add alternate method of finding TZDIR., Danny Milosavljevic, 2017/07/03
- 31/197: installer: Make minumum-store-size variable global., Danny Milosavljevic, 2017/07/03
- 33/197: installer: Improve dependencies on the final task., Danny Milosavljevic, 2017/07/03
- 17/197: installer: Add completion predicate for disk task., Danny Milosavljevic, 2017/07/03
- 21/197: installer: Fix incorrect host in ping task., Danny Milosavljevic, 2017/07/03
- 20/197: installer: Return slurped lines in their correct order.,
Danny Milosavljevic <=
- 25/197: installer: Connect ethernet interfaces on selection., Danny Milosavljevic, 2017/07/03
- 03/197: installer: Remove obsolete procedures/variables, Danny Milosavljevic, 2017/07/03
- 10/197: installer: Perform a task's dependencies prior to the task itself., Danny Milosavljevic, 2017/07/03
- 22/197: installer: Make "interfaces" return an alist., Danny Milosavljevic, 2017/07/03
- 26/197: installer: Let the kernel know about (possibly) changed partitions., Danny Milosavljevic, 2017/07/03
- 27/197: installer: Deal with partition tables which are (partially) corrupt., Danny Milosavljevic, 2017/07/03
- 28/197: installer: Add a variable to represent the minimum recommended store size., Danny Milosavljevic, 2017/07/03
- 32/197: installer: Remove ad-hoc completed predicate and use standard one., Danny Milosavljevic, 2017/07/03
- 34/197: installer: Replace some instances of "car"., Danny Milosavljevic, 2017/07/03
- 40/197: installer: Turn off kernel ring messages to console., Danny Milosavljevic, 2017/07/03