Message ID | 87y25cmw0x.fsf_-_@gnu.org |
---|---|
State | Accepted |
Headers | show |
Series | [bug#51878] installer: Rework installation device detection | expand |
Context | Check | Description |
---|---|---|
cbaines/applying patch | fail | View Laminar job |
cbaines/issue | success | View issue |
Mathieu Othacehe <othacehe@gnu.org> writes: > Hello Josselin, > I was not very clear sorry about that. I meant something like that seems > a little more concise: > > --8<---------------cut here---------------start------------->8--- > snip > --8<---------------cut here---------------end--------------->8--- > > WDYT? I agree that this reads better! Feel free to push with those changes. Best, Josselin Poiret
Hey,
> I agree that this reads better! Feel free to push with those changes.
Pushed as b90504cdb5ce3d1981c8d7bc8a9cc918b0d60af7.
Thanks,
Mathieu
diff --git a/gnu/installer/parted.scm b/gnu/installer/parted.scm index 82b01d2ce1..ad7dd6bf91 100644 --- a/gnu/installer/parted.scm +++ b/gnu/installer/parted.scm @@ -366,19 +366,16 @@ (define the-installer-root-partition-path ;; we're booting from to determine if it is the installation ;; device. (define (installation-device? device) + ;; When using CDROM based installation, the root partition path may be the + ;; device path. (or (string=? the-installer-root-partition-path (device-path device)) (let ((disk (disk-new device))) (and disk - (let loop ((partition #f)) - (let ((next-partition (disk-next-partition disk - #:partition - partition))) - (and next-partition - (or (string=? the-installer-root-partition-path - (partition-get-path - next-partition)) - (loop next-partition))))))))) + (any (lambda (partition) + (string=? the-installer-root-partition-path + (partition-get-path partition))) + (disk-partitions disk)))))) (remove installation-device? (devices))) --8<---------------cut here---------------end--------------->8---