all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mathieu Othacehe <m.othacehe@gmail.com>
To: 41560@debbugs.gnu.org
Cc: Mathieu Othacehe <othacehe@gnu.org>
Subject: [bug#41560] [PATCH 7/8] system: image: Fix image-with-os.
Date: Wed, 27 May 2020 09:24:19 +0200	[thread overview]
Message-ID: <20200527072420.26140-7-othacehe@gnu.org> (raw)
In-Reply-To: <20200527072420.26140-1-othacehe@gnu.org>

* gnu/system/image.scm (image-with-os): Do not reorder partitions, as we want
them to be created according to definition order.
---
 gnu/system/image.scm | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/gnu/system/image.scm b/gnu/system/image.scm
index a706f872a8..97124a4699 100644
--- a/gnu/system/image.scm
+++ b/gnu/system/image.scm
@@ -424,18 +424,18 @@ to OS.  Also set the UUID and the size of the root partition."
        (string=? (file-system-mount-point fs) "/"))
      (operating-system-file-systems os)))
 
-  (let*-values (((partitions) (image-partitions base-image))
-                ((root-partition other-partitions)
-                 (srfi-1:partition root-partition? partitions)))
-    (image
-     (inherit base-image)
-     (operating-system os)
-     (partitions
-      (cons (partition
-             (inherit (car root-partition))
-             (uuid (file-system-device root-file-system))
-             (size (root-size base-image)))
-            other-partitions)))))
+  (image
+   (inherit base-image)
+   (operating-system os)
+   (partitions
+    (map (lambda (p)
+           (if (root-partition? p)
+               (partition
+                (inherit p)
+                (uuid (file-system-device root-file-system))
+                (size (root-size base-image)))
+               p))
+         (image-partitions base-image)))))
 
 (define (operating-system-for-image image)
   "Return an operating-system based on the one specified in IMAGE, but
-- 
2.26.2





  parent reply	other threads:[~2020-05-27  7:25 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-27  7:22 [bug#41560] [PATCH 0/8] image: Add MBR based boot support Mathieu Othacehe
2020-05-27  7:24 ` [bug#41560] [PATCH 1/8] bootloader: Add 'disk-image-installer' Mathieu Othacehe
2020-05-27  7:24   ` [bug#41560] [PATCH 2/8] bootloader: grub: Do not run grub-install when creating a disk-image Mathieu Othacehe
2020-05-28 21:40     ` Ludovic Courtès
2020-05-27  7:24   ` [bug#41560] [PATCH 3/8] bootloader: grub: Use inheritance to define grub-minimal-bootloader Mathieu Othacehe
2020-05-27  7:24   ` [bug#41560] [PATCH 4/8] image: Add bootloader installation support Mathieu Othacehe
2020-05-27  7:24   ` [bug#41560] [PATCH 5/8] system: image: Correct genimage configuration file indentation Mathieu Othacehe
2020-05-27  7:24   ` [bug#41560] [PATCH 6/8] image: Use grub-efi to install the EFI bootloader Mathieu Othacehe
2020-05-28 21:44     ` Ludovic Courtès
2020-05-29  7:25       ` Mathieu Othacehe
2020-05-27  7:24   ` Mathieu Othacehe [this message]
2020-05-27  7:24   ` [bug#41560] [PATCH 8/8] image: Do not use VM to create disk-images Mathieu Othacehe
2020-05-28 21:47     ` Ludovic Courtès
2020-05-29  7:27       ` bug#41560: " Mathieu Othacehe
2020-05-29  8:45         ` [bug#41560] " Jan Nieuwenhuizen
2020-05-28 21:37   ` [bug#41560] [PATCH 1/8] bootloader: Add 'disk-image-installer' Ludovic Courtès
2020-05-29  7:17     ` Mathieu Othacehe
2020-05-27  8:09 ` [bug#41560] [PATCH 0/8] image: Add MBR based boot support Jan Nieuwenhuizen
2020-05-28 21:32 ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200527072420.26140-7-othacehe@gnu.org \
    --to=m.othacehe@gmail.com \
    --cc=41560@debbugs.gnu.org \
    --cc=othacehe@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.