From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 8IisFvDQbWG9iAAAgWs5BA (envelope-from ) for ; Mon, 18 Oct 2021 21:54:24 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id gEt3EvDQbWF4EQAA1q6Kng (envelope-from ) for ; Mon, 18 Oct 2021 19:54:24 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 13558366CA for ; Mon, 18 Oct 2021 21:54:24 +0200 (CEST) Received: from localhost ([::1]:36090 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcYiF-0000Sr-6w for larch@yhetil.org; Mon, 18 Oct 2021 15:54:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55968) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcYhw-0008Nq-F0 for guix-patches@gnu.org; Mon, 18 Oct 2021 15:54:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37137) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mcYhu-0003xy-Ff for guix-patches@gnu.org; Mon, 18 Oct 2021 15:54:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mcYhu-0000Qv-Eu for guix-patches@gnu.org; Mon, 18 Oct 2021 15:54:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50960] [PATCH v3 06/10] environment: Skip derivation computation when '--profile' is used. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 18 Oct 2021 19:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50960 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50960@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 50960-submit@debbugs.gnu.org id=B50960.16345867841546 (code B ref 50960); Mon, 18 Oct 2021 19:54:02 +0000 Received: (at 50960) by debbugs.gnu.org; 18 Oct 2021 19:53:04 +0000 Received: from localhost ([127.0.0.1]:48668 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mcYgx-0000Ok-Ty for submit@debbugs.gnu.org; Mon, 18 Oct 2021 15:53:04 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53456) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mcYgk-0000Mf-6b for 50960@debbugs.gnu.org; Mon, 18 Oct 2021 15:52:50 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51636) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcYge-0002mQ-UG; Mon, 18 Oct 2021 15:52:44 -0400 Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:60778 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mcYge-0007lj-Ky; Mon, 18 Oct 2021 15:52:44 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Mon, 18 Oct 2021 21:52:15 +0200 Message-Id: <20211018195219.13898-7-ludo@gnu.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211018195219.13898-1-ludo@gnu.org> References: <20211011213809.17482-1-ludo@gnu.org> <20211018195219.13898-1-ludo@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1634586864; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=9mBqYqm7h+QHAW6yD35aE2UAEYaYYuOdwmk+t4igZc0=; b=szD4IWWIxQny2WJgtPXRNoQGN6H9M8PxIAlBfw/+JaTKGpA7uLqP0qziqDdhTRcxHUtvj+ JO3SImEaiSZc6JKCQ+gEtyY8W03N8nrKPUT/hq/9VqogJ3aPrJxva4vP24mvoJ5XRgOywQ 1DY7DgZGsaFsexuKN8ZR3iFTrkr5zVptd1nwi5HwqynH0cWI9mm3XGzZYaxZISWnWBtKjr C4D8Z0HY8H4xV7E1YTV5oPMZq52CyiQGnbebo2lk6ntmnI/l0MbbZxbDudG1OeV3KC0OXQ +3VwNObqv2uH3LnkthoCBiNRNt7Gc7ZHr69UPkrztHUKqdjV6byftrKx7oev3w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1634586864; a=rsa-sha256; cv=none; b=Ni26xNpZcJRHTsVksf8htQPKBmwccyU3iN2RdRMTEBGl1oasOe00slYFr+f+rd0zJBmRPG 26iA4FBsZTzeF2fn9a1CZAdk4K6d3toTCz5FI0KlXahixcDIic1OTjECetUCCSEJQlJscZ 9kAb6GMC8IdKYQ29a0YGgPf1EOWLkB3mHgt1WvVv6wckjnNe0xXb8OaGzH7UyrIoDPp+p1 X8+4U8jn14z7HeTRtn8szANZpTJKQbEZOt6dPi62s8aPVZyCCSCA/7SUIKxOxGzDnVC/u2 C5nRR7xCC4UO6k38O5SP+QdBygfddXu09aZnDtlL48v6OMycWF3Cwpns+9TZIA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 2.77 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 13558366CA X-Spam-Score: 2.77 X-Migadu-Scanner: scn1.migadu.com X-TUID: AGxdh08CnoZ1 * guix/scripts/environment.scm (guix-environment*): Bypass calls to 'package-derivation' and to 'manifest->derivation' when PROFILE is true. --- guix/scripts/environment.scm | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm index 77956fc018..32f376fdd2 100644 --- a/guix/scripts/environment.scm +++ b/guix/scripts/environment.scm @@ -729,18 +729,21 @@ (define manifest ;; Use the bootstrap Guile when requested. (parameterize ((%graft? (assoc-ref opts 'graft?)) (%guile-for-build - (package-derivation - store - (if bootstrap? - %bootstrap-guile - (default-guile))))) + (and (or container? (not profile)) + (package-derivation + store + (if bootstrap? + %bootstrap-guile + (default-guile)))))) (run-with-store store ;; Containers need a Bourne shell at /bin/sh. (mlet* %store-monad ((bash (environment-bash container? bootstrap? system)) - (prof-drv (manifest->derivation - manifest system bootstrap?)) + (prof-drv (if profile + (return #f) + (manifest->derivation + manifest system bootstrap?))) (profile -> (if profile (readlink* profile) (derivation->output-path prof-drv))) @@ -750,9 +753,9 @@ (define manifest ;; --search-paths. Additionally, we might need to build bash for ;; a container. (mbegin %store-monad - (built-derivations (if (derivation? bash) - (list prof-drv bash) - (list prof-drv))) + (built-derivations (append + (if prof-drv (list prof-drv) '()) + (if (derivation? bash) (list bash) '()))) (mwhen gc-root (register-gc-root profile gc-root)) -- 2.33.0