From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 02 12:22:20 2022 Received: (at submit) by debbugs.gnu.org; 2 Jan 2022 17:22:20 +0000 Received: from localhost ([127.0.0.1]:33589 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n44Ym-0003Uy-D0 for submit@debbugs.gnu.org; Sun, 02 Jan 2022 12:22:20 -0500 Received: from lists.gnu.org ([209.51.188.17]:58286) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n44Yk-0003Uq-1w for submit@debbugs.gnu.org; Sun, 02 Jan 2022 12:22:18 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41222) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n44Yi-0007DX-TL for guix-patches@gnu.org; Sun, 02 Jan 2022 12:22:17 -0500 Received: from outbound.soverin.net ([116.202.126.228]:56183) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n44Yg-0002Pg-Um for guix-patches@gnu.org; Sun, 02 Jan 2022 12:22:16 -0500 Received: from smtp.freedom.nl (unknown [10.10.3.36]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id 6A2BF85C for ; Sun, 2 Jan 2022 17:22:09 +0000 (UTC) Received: from smtp.freedom.nl (smtp.freedom.nl [116.202.65.211]) by soverin.net DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=adriaan.se; s=soverin; t=1641144129; bh=un3igRj0aLqYMwPyG2Rq/EifOmCAZmYGd+PRTljvwsg=; h=From:To:Cc:Subject:Date:From; b=jEH4UKx4lY9V1tkAIvWZDiPfDSUirAXLv7728yLYFuaJSLLWrBeqsttEUWt8FRWZO iFxOL2Hhl2otne0NpSQv4I8XT6Pg0nwR+N6jm9QuOaxQY254gQC2pWxUFwu+ZLtcgI ReiIqBQankA0a79trIYJfWzmw+BAZYVGmbS/+jCIlk8bxe9YC2UT/nFoPgNB8IEe6o 3W4k4zl8Ipq/rmnZ8A+HG/cq5LbnOsgFIZ5Hbs6XjYh8KJzpKBtsUY9eCleIhZNjoF dXocautLoqfDhMUdxukjcQipFtEEH5MtsTHNXNf/5v1e018YN/GQl4FFBEd5IBS6WK j3O2zSqfCx+Zw== From: Arjan Adriaanse To: guix-patches@gnu.org Subject: [PATCH] home: import: Fix handling of manifest entries with specific output. Date: Sun, 2 Jan 2022 18:20:45 +0100 Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: none client-ip=116.202.126.228; envelope-from=arjan@adriaan.se; helo=outbound.soverin.net X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.3 (/) X-Debbugs-Envelope-To: submit Cc: Arjan Adriaanse X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) specification->package fails on manifest entries with specific outputs, resulting in an invalid home configuration. This changes the import command to use specification->package+output instead. * guix/scripts/home/import.scm (manifest+configuration-files->code): Make sure manifest entries with specific output are also handled. * tests/home-import.scm: Specify output in home environment manifest entry. --- guix/scripts/home/import.scm | 4 +++- tests/home-import.scm | 14 ++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/guix/scripts/home/import.scm b/guix/scripts/home/import.scm index fbf89069a7..15bd3140ed 100644 --- a/guix/scripts/home/import.scm +++ b/guix/scripts/home/import.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2021 Xinglu Chen ;;; Copyright © 2021 Andrew Tropin ;;; Copyright © 2021 Ludovic Courtès +;;; Copyright © 2022 Arjan Adriaanse ;;; ;;; This file is part of GNU Guix. ;;; @@ -164,7 +165,8 @@ (define (manifest+configuration-files->code manifest ,@(delete-duplicates (concatenate modules))) (home-environment - (packages (map specification->package ,packages)) + (packages (map (compose list specification->package+output) + ,packages)) (services (list ,@services))))))))) (define* (import-manifest diff --git a/tests/home-import.scm b/tests/home-import.scm index 0bcdf8a469..6d373acf79 100644 --- a/tests/home-import.scm +++ b/tests/home-import.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2021 Xinglu Chen +;;; Copyright © 2022 Arjan Adriaanse ;;; ;;; This file is part of GNU Guix. ;;; @@ -52,7 +53,8 @@ (define glibc (define gcc (manifest-entry (name "gcc") - (version "10.3.0") + (version "") + (output "lib") (item "/gnu/store/..."))) ;; Helpers for checking and generating home environments. @@ -101,8 +103,8 @@ (define-home-environment-matcher match-home-environment-no-services ('gnu 'services)) ('home-environment ('packages - ('map 'specification->package - ('list "guile@2.0.9" "gcc" "glibc@2.19"))) + ('map ('compose 'list 'specification->package+output) + ('list "guile@2.0.9" "gcc:lib" "glibc@2.19"))) ('services ('list))))) @@ -118,7 +120,7 @@ (define-home-environment-matcher match-home-environment-transformations ('home-environment ('packages ('list (transform ('specification->package "guile@2.0.9")) - ('specification->package "gcc") + ('list ('specification->package "gcc") "lib") ('specification->package "glibc@2.19"))) ('services ('list))))) @@ -130,7 +132,7 @@ (define-home-environment-matcher match-home-environment-no-services-nor-packages ('gnu 'services)) ('home-environment ('packages - ('map 'specification->package + ('map ('compose 'list 'specification->package+output) ('list))) ('services ('list))))) @@ -145,7 +147,7 @@ (define-home-environment-matcher match-home-environment-bash-service ('gnu 'home 'services 'shells)) ('home-environment ('packages - ('map 'specification->package + ('map ('compose 'list 'specification->package+output) ('list))) ('services ('list ('service base-commit: a655d731e2c1bb912aa52b6e00b0d69394aa2a3b -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 05 17:08:47 2022 Received: (at 52961-done) by debbugs.gnu.org; 5 Jan 2022 22:08:48 +0000 Received: from localhost ([127.0.0.1]:39122 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n5ESd-0000cn-P0 for submit@debbugs.gnu.org; Wed, 05 Jan 2022 17:08:47 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:45498) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n5ESb-0000ca-Mm for 52961-done@debbugs.gnu.org; Wed, 05 Jan 2022 17:08:46 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 3CE6A112; Wed, 5 Jan 2022 23:08:40 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8G-CNJ3rnGeB; Wed, 5 Jan 2022 23:08:39 +0100 (CET) Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 96C61103; Wed, 5 Jan 2022 23:08:39 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Arjan Adriaanse Subject: Re: bug#52961: [PATCH] home: import: Fix handling of manifest entries with specific output. References: Date: Wed, 05 Jan 2022 23:08:39 +0100 In-Reply-To: (Arjan Adriaanse's message of "Sun, 2 Jan 2022 18:20:45 +0100") Message-ID: <87bl0pj0ns.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / Authentication-Results: hera.aquilenet.fr; none X-Rspamd-Server: hera X-Rspamd-Queue-Id: 3CE6A112 X-Spamd-Result: default: False [-0.10 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 52961-done Cc: 52961-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hi, Arjan Adriaanse skribis: > specification->package fails on manifest entries with specific outputs, > resulting in an invalid home configuration. This changes the import comm= and > to use specification->package+output instead. > > * guix/scripts/home/import.scm (manifest+configuration-files->code): Make= sure > manifest entries with specific output are also handled. > * tests/home-import.scm: Specify output in home environment manifest entr= y. Applied, thanks for fixing it! Ludo=E2=80=99. From unknown Tue Jun 17 01:43:59 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 03 Feb 2022 12:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator