diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2022-07-01 10:26:17 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2022-07-01 12:10:28 +0200 |
| commit | 9f530ef38a23caa1136f93cda45d396ce8fe1569 (patch) | |
| tree | e22c999dbc8a1fa983c59c21fa444984ec6be7f1 /gnu | |
| parent | e871c3a857005c2c55fcbf4dbd48e22fe33b6451 (diff) | |
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.
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/image.scm | 2 | ||||
| -rw-r--r-- | gnu/system/image.scm | 3 | ||||
| -rw-r--r-- | gnu/tests/base.scm | 1 |
3 files changed, 3 insertions, 3 deletions
diff --git a/gnu/image.scm b/gnu/image.scm index e10a495d3d2..e347089b342 100644 --- a/gnu/image.scm +++ b/gnu/image.scm | |||
| @@ -70,7 +70,7 @@ | |||
| 70 | (label partition-label (default #f)) | 70 | (label partition-label (default #f)) |
| 71 | (uuid partition-uuid (default #f)) | 71 | (uuid partition-uuid (default #f)) |
| 72 | (flags partition-flags (default '())) | 72 | (flags partition-flags (default '())) |
| 73 | (initializer partition-initializer (default #f))) | 73 | (initializer partition-initializer (default #f))) ;gexp | #f |
| 74 | 74 | ||
| 75 | 75 | ||
| 76 | ;;; | 76 | ;;; |
diff --git a/gnu/system/image.scm b/gnu/system/image.scm index f1739a35c1b..60ae38f6d89 100644 --- a/gnu/system/image.scm +++ b/gnu/system/image.scm | |||
| @@ -374,7 +374,8 @@ used in the image." | |||
| 374 | (type (partition-file-system partition)) | 374 | (type (partition-file-system partition)) |
| 375 | (image-builder | 375 | (image-builder |
| 376 | (with-imported-modules* | 376 | (with-imported-modules* |
| 377 | (let ((initializer #$(partition-initializer partition)) | 377 | (let ((initializer (or #$(partition-initializer partition) |
| 378 | initialize-root-partition)) | ||
| 378 | (inputs '#+(list e2fsprogs fakeroot dosfstools mtools)) | 379 | (inputs '#+(list e2fsprogs fakeroot dosfstools mtools)) |
| 379 | (image-root "tmp-root")) | 380 | (image-root "tmp-root")) |
| 380 | (sql-schema #$schema) | 381 | (sql-schema #$schema) |
diff --git a/gnu/tests/base.scm b/gnu/tests/base.scm index 8284446868b..353d6d415ae 100644 --- a/gnu/tests/base.scm +++ b/gnu/tests/base.scm | |||
| @@ -637,7 +637,6 @@ in a loop. See <http://bugs.gnu.org/26931>.") | |||
| 637 | (size 'guess) | 637 | (size 'guess) |
| 638 | (offset (* 512 2048)) ;leave room for GRUB | 638 | (offset (* 512 2048)) ;leave room for GRUB |
| 639 | (flags '(boot)) | 639 | (flags '(boot)) |
| 640 | (initializer #~initialize-root-partition) | ||
| 641 | (label "root-under-test")))))) ;max 16 characters! | 640 | (label "root-under-test")))))) ;max 16 characters! |
| 642 | 641 | ||
| 643 | (define observer-os | 642 | (define observer-os |
