mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-11 13:49:23 -05:00
image: Add default value for partition initializer.
Previously, the default value would lead to a wrong-type-to-apply crash. * gnu/system/image.scm (system-disk-image)[image-builder]: When 'partition-initializer' returns #f, fall back to INITIALIZE-ROOT-PARTITION. * gnu/tests/base.scm (run-root-unmount-test)[test-image]: Remove 'initializer' field of partition. * gnu/image.scm (<partition>)[initializer]: Add comment.
This commit is contained in:
parent
e871c3a857
commit
9f530ef38a
3 changed files with 3 additions and 3 deletions
|
@ -70,7 +70,7 @@ (define-record-type* <partition> partition make-partition
|
||||||
(label partition-label (default #f))
|
(label partition-label (default #f))
|
||||||
(uuid partition-uuid (default #f))
|
(uuid partition-uuid (default #f))
|
||||||
(flags partition-flags (default '()))
|
(flags partition-flags (default '()))
|
||||||
(initializer partition-initializer (default #f)))
|
(initializer partition-initializer (default #f))) ;gexp | #f
|
||||||
|
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
|
|
|
@ -374,7 +374,8 @@ (define (partition-image partition)
|
||||||
(type (partition-file-system partition))
|
(type (partition-file-system partition))
|
||||||
(image-builder
|
(image-builder
|
||||||
(with-imported-modules*
|
(with-imported-modules*
|
||||||
(let ((initializer #$(partition-initializer partition))
|
(let ((initializer (or #$(partition-initializer partition)
|
||||||
|
initialize-root-partition))
|
||||||
(inputs '#+(list e2fsprogs fakeroot dosfstools mtools))
|
(inputs '#+(list e2fsprogs fakeroot dosfstools mtools))
|
||||||
(image-root "tmp-root"))
|
(image-root "tmp-root"))
|
||||||
(sql-schema #$schema)
|
(sql-schema #$schema)
|
||||||
|
|
|
@ -637,7 +637,6 @@ (define test-image
|
||||||
(size 'guess)
|
(size 'guess)
|
||||||
(offset (* 512 2048)) ;leave room for GRUB
|
(offset (* 512 2048)) ;leave room for GRUB
|
||||||
(flags '(boot))
|
(flags '(boot))
|
||||||
(initializer #~initialize-root-partition)
|
|
||||||
(label "root-under-test")))))) ;max 16 characters!
|
(label "root-under-test")))))) ;max 16 characters!
|
||||||
|
|
||||||
(define observer-os
|
(define observer-os
|
||||||
|
|
Loading…
Reference in a new issue