From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id oJcoOy9NV2SLCgAASxT56A (envelope-from ) for ; Sun, 07 May 2023 09:03:12 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id OMArOy9NV2SG+wAA9RJhRA (envelope-from ) for ; Sun, 07 May 2023 09:03:11 +0200 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 B50F62ED97 for ; Sun, 7 May 2023 09:03:11 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pvXmV-0000KM-Vo; Sun, 07 May 2023 02:22:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pv27u-0006EX-AY for bug-guix@gnu.org; Fri, 05 May 2023 16:34:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pv27u-0006Ca-2L for bug-guix@gnu.org; Fri, 05 May 2023 16:34:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pv27t-0006sE-Tq for bug-guix@gnu.org; Fri, 05 May 2023 16:34:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#63319: Incorrect propagation chain reporting on profile collision Resent-From: Ulf Herrman Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 05 May 2023 20:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 63319 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 63319@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.168331883926411 (code B ref -1); Fri, 05 May 2023 20:34:01 +0000 Received: (at submit) by debbugs.gnu.org; 5 May 2023 20:33:59 +0000 Received: from localhost ([127.0.0.1]:57636 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv27q-0006rv-N3 for submit@debbugs.gnu.org; Fri, 05 May 2023 16:33:59 -0400 Received: from lists.gnu.org ([209.51.188.17]:60812) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv27m-0006rk-3s for submit@debbugs.gnu.org; Fri, 05 May 2023 16:33:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pv27l-00065H-OA for bug-guix@gnu.org; Fri, 05 May 2023 16:33:53 -0400 Received: from tilde.club ([142.44.150.184]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pv27f-00069i-Eh for bug-guix@gnu.org; Fri, 05 May 2023 16:33:53 -0400 Received: by tilde.club (Postfix, from userid 5378) id B91BD2238FF42; Fri, 5 May 2023 20:33:43 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 tilde.club B91BD2238FF42 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tilde.club; s=mail; t=1683318823; bh=CkH4ma9HSAv7U9eChhlOSp+JNIOImdHRyDR+Dqp/Rrs=; h=From:To:Subject:Date:From; b=Eu7v7RSfEccmRXFppOxyAQ7i3X4/V6U6OGg8gu0AoIhdhi0/eahLrBddAcF+hphad JRCkY4QuQ8+YA69jHw4R5luBsxVWqpTfYwaqd2kQnVajPFuApZhfDiX2HNwaNZhnis CWqqqxsU2dDewrmsJe2kNpR0S7L/I5LEJBpg6oVY= From: Ulf Herrman Date: Fri, 05 May 2023 15:32:51 -0500 Message-ID: <87v8h6r024.fsf@tilde.club> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: pass client-ip=142.44.150.184; envelope-from=striness@tilde.club; helo=tilde.club X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Sun, 07 May 2023 02:21:59 -0400 X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1683442991; a=rsa-sha256; cv=none; b=lv45dCzz/c2FH9Y7zw00o5QmSUOuVLHTEvrTGGxTqFizBu1gBMw71wC7D1gKAkTsbOylYp fOhN6HBF+xPn3ch64irgwMkQLjoqEank22/ETrbqg44q8xwuBSKbTVfTCyjjnx5xYG74Oe ctFwlMWtzOErQ7XQzg8VvIxwFaetQdkGnJHBsct/oMOmK1q2Nav0YlBqKe/hTvnOgpcuWl TbRgXSHscREBA42r6yXjq5jqn7bFt82N6UkDiOU8s11NiIg6bLkt4f0zr2nwF2z0mAOWSX wMEq/eu//UFAh0ldhRMrObYKU0Ow06zi0TXYuDNDbXDlmSC+Yg3uA4nTpEj27A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tilde.club header.s=mail header.b=Eu7v7RSf; dmarc=fail reason="SPF not aligned (relaxed)" header.from=tilde.club (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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1683442991; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=ydoW6h4zfAKe+6a8tliT2b1cA9oSuenHDHs7vRw5y80=; b=VXpRiHtvVBhYXv/M2lpuv0a6MwH+DtQnEl8pCXtvB7lKyvyGBe5KfP7sLzqr+C4gLN9Gxs QzZIOiu9qRhPAyWuvdUhMAeCjG2or7yKt6+WNJm0L0IMAyaoqIr7dakZ/L1y6JC7q9ipL2 UT3LminZsFc/RcgpY0m74yPKNStraCV3PZZiCDBRNHuK8tA9qpWMHfMTiWQHnxMB+6dVI8 ZMrvtwTn4BfxZBvXfVlmdRPo+DKnSSA2p9/OJ3z6bMzUCdLjjf+d+zBVrkCpw6eOWi0tqK M3TeIkjAy6SEuQAUgT9TsORzH0dQmsBG7K7s+HMhdXV84VEAIP6mcUIzdXdQDQ== X-Migadu-Spam-Score: -0.31 X-Spam-Score: -0.31 X-Migadu-Queue-Id: B50F62ED97 X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tilde.club header.s=mail header.b=Eu7v7RSf; dmarc=fail reason="SPF not aligned (relaxed)" header.from=tilde.club (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-TUID: rCkot9qi+UPz --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable A has a `parent' field that contains a promise that returns either #f or another . This is somewhat incomplete information - a given entry can be a propagated-input to multiple entries, so there can actually be multiple parents. Given that this is only used for tracing a propagation chain to display to the user, though, that shouldn't be a problem. What is a problem, though, is that this field is determined when the manifest is read in and remains static thereafter. To demonstrate this, consider the following example: User installs package A1, which propagates B1. User also installs package C, which also propagates B1. Later the package definition for A is updated with a newer version, A2, and this propagates a newer version of B, B2. User runs 'guix pull', and subsequently runs 'guix package =2Du'. Note that C is unchanged and still propagates B1. Guix sees that the proposed new manifest contains A2, C, B1, and B2, and properly detects that B1 and B2 represent a collision. It traces B2 back to A2 correctly, and then goes to hunt down what propagated B1. What happens next depends somewhat on the arbitrary ordering of entries in the manifest, but it is entirely possible that the parent recorded for B1 is not C, but A1, even though the proposed new manifest doesn't even contain A1. So you end up with bizarre error messages like this: =2D---------------------------------------- $ guix package -u certbot The following package will be upgraded: certbot 1.28.0 =E2=86=92 2.3.0 guix package: error: profile contains conflicting entries for python-crypto= graphy guix package: error: first entry: python-cryptography@40.0.1 /gnu/store/b= cixgv8vg9bz6gyvijavqiha77h17icv-python-cryptography-40.0.1 guix package: error: ... propagated from python-josepy@1.13.0 guix package: error: ... propagated from python-acme@2.3.0 guix package: error: ... propagated from certbot@2.3.0 guix package: error: second entry: python-cryptography@3.4.8 /gnu/store/2= kz701xhwvcswdp4dj3fd7v86v2ra70x-python-cryptography-3.4.8 guix package: error: ... propagated from python-josepy@1.13.0 guix package: error: ... propagated from python-acme@1.28.0 guix package: error: ... propagated from certbot@1.28.0 hint: You cannot have two different versions or variants of `certbot' in th= e same profile. =2D---------------------------------------- This happens because the collision check is performed on the new manifest, and the parent fields are leftover from the old manifest. Ultimately, the parent field is just an optimization - it can always be re-derived from a manifest, and indeed, when a is shared across multiple manifests, *must* be re-derived with respect to a given manifest in order for it to make sense. I propose that we remove the 'parent' field entirely and modify &profile-collision-error so that it also reports the manifest the collision occurred in. (guix ui) can then use this to provide more complete (and also accurate) error messages. Note that at present check-for-collisions actually can report manifest entries that aren't "part of" *any* manifest, since they're freshly created by lower-manifest-entry. Tangentially related: it's worth noting that only showing two propagation chains tends to lead to frustrating "whack-a-mole"-style package transactions, since a decision about which package to keep, remove, or upgrade has to be made before the next collision source can be found. We should probably add a profile mode to 'guix graph' that shows the propagation graph for a proposed new profile manifest, or at least let 'guix package' show all collisions when invoked with higher verbosity. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQHIBAEBCAAyFiEEn6BUn0yca1D9JsMa1lV76sJM9mgFAmRVaAkUHHN0cmluZXNz QHRpbGRlLmNsdWIACgkQ1lV76sJM9mi53wv/bGzoi5Ro1ifiG0xtSn2Ej24FVZyv XAQMHnLp7N15wb2e8Gbf+JpWp+bO0Iwhi17FaNCyaCcwrhcNl5uWkGczyvYsk0DV OX4BrisqAc/5OFOo5KmrRqCZycAXr0uzd9o9o/XafSoaWjFymIkebLJGVsaEZcxG MZbQ0EyORSsTlLO+m1BqzDWznDEN04zaoyIBA3tNO3hkFf5M0Smzp5vS+DolCuVE YPqSH8JpS4Zl6hMKluuN65mkAM8s2QmvhWs3lujnNdLu61LdvXPZHTFBXJ5qcWOP 0w12K0CM4arj5AXX1S3PaRqnmfJWDW9PukKolVhtUOo/N9Apc/Z2msx9LrtHBGQG RqH+5dPtxUpqqbagh9cz9vA3kbRapAqC/ba/dvcrNm1zwqu+CqjMZdmvKtaY4Bax bfZF1/m5ubL9GiGHb54dsVejsaM7bpFC5JllJlpA6YVc6i2KkQzE39JMIDFoIlo1 sxNDKXSur1ef+C8t0TdCgddYmWBKUM9wjvaG =E6NE -----END PGP SIGNATURE----- --=-=-=--