From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id MGyTB7dn4WFQ0AAAgWs5BA (envelope-from ) for ; Fri, 14 Jan 2022 13:08:23 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id aBLqBLdn4WGnWgAA9RJhRA (envelope-from ) for ; Fri, 14 Jan 2022 13:08:23 +0100 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 ABFC14157E for ; Fri, 14 Jan 2022 13:08:22 +0100 (CET) Received: from localhost ([::1]:39082 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n8LNV-0005Dk-NO for larch@yhetil.org; Fri, 14 Jan 2022 07:08:21 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51446) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n8LIe-00011z-Nb for bug-guix@gnu.org; Fri, 14 Jan 2022 07:03:20 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:42892) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n8LIN-0005Ag-3Y for bug-guix@gnu.org; Fri, 14 Jan 2022 07:03:08 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n8LIM-0001VV-Vw for bug-guix@gnu.org; Fri, 14 Jan 2022 07:03:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#53224: Cookbook recipe about profile collisions Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 14 Jan 2022 12:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53224 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 53224-submit@debbugs.gnu.org id=B53224.16421617605740 (code B ref 53224); Fri, 14 Jan 2022 12:03:02 +0000 Received: (at 53224) by debbugs.gnu.org; 14 Jan 2022 12:02:40 +0000 Received: from localhost ([127.0.0.1]:35790 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8LI0-0001UV-CM for submit@debbugs.gnu.org; Fri, 14 Jan 2022 07:02:40 -0500 Received: from mail-io1-f54.google.com ([209.85.166.54]:42898) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8LHy-0001UG-VR for 53224@debbugs.gnu.org; Fri, 14 Jan 2022 07:02:39 -0500 Received: by mail-io1-f54.google.com with SMTP id a12so7148772iod.9 for <53224@debbugs.gnu.org>; Fri, 14 Jan 2022 04:02:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=TEzcOMRlgT4swk3EJ9uwtS6FziFp0rZELuYNNG1Q2EM=; b=CUF7wtjGLuSVWXAf2YB5S0QalRu6b6AQTKjjWn2sTcXAtLpF/nAcNRQDEm6d8H5W6Q jRkqgnBTr3CCNiCwFstxwTjs+eergwFF7bsxilyBlh7tJ0b6qjpg4FULkDGNQNC+XyPU Xkf4T1Gj1LqzLK5yTl/XNVWB5O3cAxQVAxO+gJYKyKeCvpkzuS7xq5tqOtuOLeSVjoqj 2srPs0W4f5+PqF6MaFRZ6KlfSzmMmDtX2cpe7YEHof0XSSKtnn/z8/ylQtlKN2oVvV/w KmFwMkWwkh/O1U5hgYrSDwI80z1h6kTrhsO12w+o3+Mga4R1OAZXu8XtObLGpcIJQ+PH INyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=TEzcOMRlgT4swk3EJ9uwtS6FziFp0rZELuYNNG1Q2EM=; b=XXj4FI64ii8l1gZADzMgMtczOUt/X2AHTqxBAIjJ/yOd1XgnuMv8DC6IDRC7YWJ6JK t4pB5jTxxMhjy/0Gy262Kbd73DJ2e3dyXq4aPPuwiMQ79rwL5K/VwZFKYtNpEgbmfuQv oBsoUnVzVTTQinBzA/lOAwEX7YvOEhd9uLDpVNajznUxW0FUg/EohKtdXud36mzcIhMd Cbog8xyJfBYW5QUX0LdS5SaivyqzIBrtVs7GkeIufcruCnRoAxPdq2A97QJWmLO60pB+ D+11HiLjGTN4JdoRU4gQ6aPn2FhhT6Haf9Lds1e1GZ/qeasNOaoWq+VfjUf1baoqyGp1 QEkg== X-Gm-Message-State: AOAM531qnJ3R1LOYAx4OkbWz84JQT24qUs5aEH50hO4UM36fKXo/YpxT e+xNjx6GaPLszDO82Y2UG7RkxrTN4S3ShyjomOs= X-Google-Smtp-Source: ABdhPJxCkY1utanTO/iBlat5nf8xGgOMBvr3W0YLiGL6qNKOqvAKNeCEGodzKXAkm0+FcTxkbcA6Ru38XweImSVrQVs= X-Received: by 2002:a02:6f5e:: with SMTP id b30mr4032841jae.182.1642161753220; Fri, 14 Jan 2022 04:02:33 -0800 (PST) MIME-Version: 1.0 References: <87v8ym4sav.fsf@gnu.org> In-Reply-To: <87v8ym4sav.fsf@gnu.org> From: zimoun Date: Fri, 14 Jan 2022 13:02:21 +0100 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 53224@debbugs.gnu.org, Matt Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1642162102; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: 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:dkim-signature; bh=TEzcOMRlgT4swk3EJ9uwtS6FziFp0rZELuYNNG1Q2EM=; b=nXh1b94Jf9oUu8fSdO4QleFiiPgQznmWSzaeDVWG6FraVAT7PVGolx32ZxUjrCjwSOT7jL VebSfB9VE3A8Hbhr6JI7ZRVReuwXls5Qyjw3SS0bNcwMvdEj9THchzB2SN7swArKRzTE5h Ct29wnsFsUR7hlb/6GuAtZpu/t6dpWLPqEhIzOc7O0jeSamWda1v/HUoQnr+AD6qViYCXr Iuc5r16uIJrFndZJldV8bqMPrgOOgTFFx7HW9NkkyfTU3w/VjFctg5jG5AM6jdCxA8lLE0 bgFC5KYGExua6FETJxEFxubKgVKmj26ab5RY64IWhRaXTy6fisdhpoDfHQeLRw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1642162102; a=rsa-sha256; cv=none; b=oQi7eK3L1Hh6w4WdwxxnU+kEdNWZzjgbI0ehll7R2Ix5xum7ptk7UsJvv/dizDjyKiLkck H5wM7G/vlJM1ObgJNPklU4ryPpVafn80VekV7ImxRXrjQNOZ6ccCviqJFdUq5P23Mi51nV iiPqMdNQvRErqSIqwopTQ0iQAJWreogaHgvGCjw0BLxD4xcp/CBAq+Xd2P+eSaR1uuWNim dntLjqFTHQ2VQzV2x/wj770tpIhA9GuOsF3wYWLW1nv8mZuwEQZfadkl7wq2+ukAqQGKJe 4BsbvCBn9e234PihRdEb3enGUnsjxIxOTj7VYithfXxhT6X26mtsmYDTULburA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=CUF7wtjG; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.82 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=CUF7wtjG; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: ABFC14157E X-Spam-Score: -2.82 X-Migadu-Scanner: scn0.migadu.com X-TUID: vDqrCkb0PNiJ Hi, On Fri, 14 Jan 2022 at 10:02, Ludovic Court=C3=A8s wrote: > Currently, on profile collisions, the error message shows where the > collision originates and a hint on how to work around it. Perhaps the > hint is sometimes wrong (in which cases?), or perhaps it=E2=80=99s too te= rse? > Can it be improved? I do not know how it could be improved since it is often case per case. For instance, recently we had a collision for python-numpy and the fix was to introduce python-numpy-next. That's said, to me the origin of the collision is often enough for resolving. However, indeed the user must have a clear understanding of Guix profile and propagation. Therefore, an entry to the Cookbook explaining what does it mean and where to look appears to me a good idea. > The definition of what a profile is is another topic. Currently the > term =E2=80=9Cprofile=E2=80=9D is defined in =E2=80=9CGetting Started=E2= =80=9D: > > https://guix.gnu.org/manual/en/html_node/Getting-Started.html#index-pro= file > > It=E2=80=99s very much defined in passing though. How can we improve on = that? > > In some early talks we had illustrations of the symlink forest of a > profile borrowed from Eelco Dolstra=E2=80=99s own talks on the matter; se= e for > instance p. 17 of . I > stopped using it because I think those symlinks are an implementation > detail and it doesn=E2=80=99t help to focus on symlinks (and hashes and a= ll > that) when giving an overview of the tool. Now, perhaps that > illustration could be useful in the manual. Well, I do not want to drift the initial message. I am just keeping the rolling ball. :-) In the tutorial I am preparing for JRES, I am doing this way, as a dialogue (below). Basically, it is how I am somehow explaining to the few users I have here, with various background. This cannot go to the manual but maybe it could be useful or worth for the Cookbook. To me, what is an implementation detail is all the dance with /var/, the generations, the garbage collection, etc. But the fact that a profile is symlink pointing a directory with the structure of /usr/ and containing all the environment variables is not an implementation detail. It appears to me a core concept to switch from traditional distro with only one /usr/ to Guix and how to compose many /usr/. Alice: Where are my packages? Bob: Installing a package ends with this hint ...snippet... Alice: Ah, I am confused Bob: Well, $HOME/.guix-profile is thus the default profile Alice: What does it mean? Bob: Look at guix package --search-paths -p $HOME/.guix-profile Alice: I see, but what is this $HOME/.guix-profile Bob: Look at: file $HOME/.guix-profile Alice: Ah, right. My conclusion is: - a profile contains the environment variables - a profile is a symlink Bob: Correct. Alice: But a symlink pointing to where? Bob: Look at: readlink -f $HOME/.guix-profile Alice: It points to a store item, but what does it mean? Bob: Look at: file $(readlink -f $HOME/.guix-profile) Alice: Ah right. My conclusion is: - a profile points to a directory item in the store Bob: Correct. Alice: What is inside this directory Bob: Look at: ls $(readlink -f $HOME/.guix-profile) Alice: Oh, it looks the same hierarchy as the usual and well-know /usr/ Bob: Correct. Alice: What does it happen when I type python3 I just installed Bob: Look at: which python3 Alice: Ah right. Is the binary really in the directory item above? Bob: Look at: readlink $(which python3) Alice: Oh right. A profile points to store item which points to other store items. Bob: Correct. Alice: I guess these other store items have also an /usr/ hierarchy, right? Bob: Correct. Do you know how to check that? Alice: ls $(readlink $(which python3)) Bob: Correct. Alice: I summarize. A profile is: - a symlink - which points to a store item - which points to many other store items - and all have the structure hierarchy of /usr/ Woo, it is a forest of symlinks! ... image ... Cheers, simon