From patchwork Wed May 27 07:24:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Othacehe X-Patchwork-Id: 22403 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 0473027BBE3; Wed, 27 May 2020 08:25:12 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id C98B327BBE1 for ; Wed, 27 May 2020 08:25:11 +0100 (BST) Received: from localhost ([::1]:60874 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdqR5-00053p-Aj for patchwork@mira.cbaines.net; Wed, 27 May 2020 03:25:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41878) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdqQy-00051m-UA for guix-patches@gnu.org; Wed, 27 May 2020 03:25:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36550) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jdqQy-0001An-JK for guix-patches@gnu.org; Wed, 27 May 2020 03:25:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jdqQy-0003iN-GL for guix-patches@gnu.org; Wed, 27 May 2020 03:25:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41560] [PATCH 7/8] system: image: Fix image-with-os. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 27 May 2020 07:25:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41560 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41560@debbugs.gnu.org Cc: Mathieu Othacehe Received: via spool by 41560-submit@debbugs.gnu.org id=B41560.159056429114206 (code B ref 41560); Wed, 27 May 2020 07:25:04 +0000 Received: (at 41560) by debbugs.gnu.org; 27 May 2020 07:24:51 +0000 Received: from localhost ([127.0.0.1]:48088 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jdqQl-0003gx-4s for submit@debbugs.gnu.org; Wed, 27 May 2020 03:24:51 -0400 Received: from mail-wr1-f51.google.com ([209.85.221.51]:35373) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jdqQc-0003fZ-B1 for 41560@debbugs.gnu.org; Wed, 27 May 2020 03:24:42 -0400 Received: by mail-wr1-f51.google.com with SMTP id x14so17558379wrp.2 for <41560@debbugs.gnu.org>; Wed, 27 May 2020 00:24:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tmHavA/iyYGOtQCIarJNHSwcrfGqzebBUjFLfQpN014=; b=lY7qKyuDN37FstEigpVwnUay8wXEraeZpzpv6vClwEOe+tqmYM1en+rDDca8KJKpUD iVn/yvUIRu9XSk3+odNw/3q/kc5jnkXNguoyWuviIVhts2EmfSb6EoGv9fDk0e9QGgZy rPmxmmEZyF+aQAoFxfUBn9Am4w7dBWTE40DmzQi7nzP69Nu3zo2j1JuOl+WR52Y8kR30 TsLenWfz/Ix2HsCXM8LMDrQ36g3h4XSE8FpgNCVg/muW4Q2fzTiYXDVUMQHOY8cDCj+u q4TLTysPCd2uSht8gaCd8ocRhmGcw81Fg0vdcffy1iwem9XA0t50jVb+pb7IMbyidPYq XhYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tmHavA/iyYGOtQCIarJNHSwcrfGqzebBUjFLfQpN014=; b=kO9eiez7U9yumPiqALaVHMkz4AEdgwsQtfzuhjr95KcxNgBb/yP4fbdpxls8J/nmDx GBiAk5ocCJ/z3ICdLBk5ZMwRk3PP+Rjrm7CpIIAXxPvGVxyugAVkqcCMGL3qzc2PrDM0 Tmp4W2wOKO3tNJ6Eh2reIT4g25HVm1AKRyZnFptG2aqPDeDjMvFV2pwqVzQTmkJJ2cPm LD4xUkznvzZsv1xKa8O9+k5bnTuMc6la+YSJer5EfDi3K+kLvcf0YeXdVsEg26+iUMNT 9G7hGpzTDFh4L8qCOyPZHUBm9nCUDvYk2xjWeeERNE8ElESOM7zviBkduSQdG73juIsL aWaA== X-Gm-Message-State: AOAM530gElQSr+t56M/qGy3orN2eB9w1uTieSdp2rFa8kQ40lyvtJ51X B/ob6gYfJsxyf7gJ912Or0/P/mVAc6I= X-Google-Smtp-Source: ABdhPJyaEA6/GuP7TGQHfUY/tnQPgh6rej67t7j83J4YawhyxffVfVQFWEgWrdgQMqN5dNmyWTh7lQ== X-Received: by 2002:a5d:460d:: with SMTP id t13mr24731211wrq.280.1590564276162; Wed, 27 May 2020 00:24:36 -0700 (PDT) Received: from meru.fronius.com ([2a01:e0a:fa:a50:e5a2:3f70:d249:6ce9]) by smtp.gmail.com with ESMTPSA id v28sm2002845wra.77.2020.05.27.00.24.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 May 2020 00:24:35 -0700 (PDT) From: Mathieu Othacehe X-Google-Original-From: Mathieu Othacehe Date: Wed, 27 May 2020 09:24:19 +0200 Message-Id: <20200527072420.26140-7-othacehe@gnu.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200527072420.26140-1-othacehe@gnu.org> References: <20200527072420.26140-1-othacehe@gnu.org> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * 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