From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id KNIDDLEzWGH1qQAAgWs5BA (envelope-from ) for ; Sat, 02 Oct 2021 12:25:53 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id OC6rB7EzWGGbIgAAB5/wlQ (envelope-from ) for ; Sat, 02 Oct 2021 10:25:53 +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 EFAF72D960 for ; Sat, 2 Oct 2021 12:25:52 +0200 (CEST) Received: from localhost ([::1]:53128 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWcDI-0002s8-1m for larch@yhetil.org; Sat, 02 Oct 2021 06:25:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38422) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWcBX-0002G5-0K for guix-patches@gnu.org; Sat, 02 Oct 2021 06:24:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46429) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWcBW-0000BW-PM for guix-patches@gnu.org; Sat, 02 Oct 2021 06:24:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mWcBW-0007Yt-MO for guix-patches@gnu.org; Sat, 02 Oct 2021 06:24:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50960] [PATCH 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: Sat, 02 Oct 2021 10:24: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.163317019228950 (code B ref 50960); Sat, 02 Oct 2021 10:24:02 +0000 Received: (at 50960) by debbugs.gnu.org; 2 Oct 2021 10:23:12 +0000 Received: from localhost ([127.0.0.1]:57963 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWcAh-0007Wl-Os for submit@debbugs.gnu.org; Sat, 02 Oct 2021 06:23:11 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33134) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWcAW-0007UL-2L for 50960@debbugs.gnu.org; Sat, 02 Oct 2021 06:23:00 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49198) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWcAQ-0007eo-Ss; Sat, 02 Oct 2021 06:22:54 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=36460 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 1mWcAQ-0007gb-E9; Sat, 02 Oct 2021 06:22:54 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Sat, 2 Oct 2021 12:22:36 +0200 Message-Id: <20211002102240.27815-6-ludo@gnu.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211002102240.27815-1-ludo@gnu.org> References: <20211002102240.27815-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=1633170353; 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=qyYidtIqsAsXYg1+jID18kDj8CihtjYrsY1M6Xmi5kY=; b=g3rk4sAlzbiHVsNP/CdZB22Yzv/O2IUeqjv9XQ349v9VwyQNMvMKVBsd7BARbhIs/bNyXJ kmgjlxL0nfcvLrWmKtuOosn/J8zH15wLbpbqgr5sHU3suGte7Dq8G93saZV/TAseJbCrZH uoXh69xsF5Ms6cScLiQ76u0Bz3zYIDCyt74fTLQ4wugHsr9N1VndUrLaGHc29bYkoHqaAt ZABwHAP7tRiBImTGlqbDKKkqm9u/dlHARqAh/8FbSJYc85mVA4wzhFB+lHIC46tLyTcFEj mSz/BpHQk9pkBAY2u9eQj0P8CUa1E/9btVjbZENppSvGAi+YRSeqaDdcVPsHXg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1633170353; a=rsa-sha256; cv=none; b=aJJ2lSOUasas/fe6EmH0zn90tIisjGjojd11oltmxMVcjCmIKjsGavRsPOg6E/gAhvMY+2 sU+78/8o12vW1dmY6rrc1U84opM9aBKtwT3rv1RiwYcikCSXZ7muAp1wfxZrNqQyZcHxRZ reWWy4n7t8kwScJ0oTnWjNiUmq3EQNB+B/BfOzKkcfiFpXRoOsaiYXqYF9ywSjUlsJx+HP BibRmTcPSrW6ylG5+5kiUAJFxGDQIu/BZwi9TzN6m7m4vtXtSEIU1kl5D+IwVUtg8Trxte qbG/fbQybV37UzacoEfo6qW9ioEXzsMXhMT5ao9RIpfQFGWN73YbtPjH2EPdqA== ARC-Authentication-Results: i=1; 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-Spam-Score: 2.79 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: EFAF72D960 X-Spam-Score: 2.79 X-Migadu-Scanner: scn1.migadu.com X-TUID: w6uQsu2PAJdf * 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 @@ command-line option processing with 'parse-command-line'." ;; 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 @@ command-line option processing with 'parse-command-line'." ;; --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