GNU bug report logs

#54350 'guix shell' skips profile collision checks

PackageSource(s)Maintainer(s)
guix PTS Buildd Popcon
Full log

Message #16 received at 54350@debbugs.gnu.org (full text, mbox, reply):

Received: (at 54350) by debbugs.gnu.org; 15 Mar 2022 15:58:50 +0000
From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 15 11:58:50 2022
Received: from localhost ([127.0.0.1]:49399 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1nU9ZS-0002pM-0i
	for submit@debbugs.gnu.org; Tue, 15 Mar 2022 11:58:50 -0400
Received: from baptiste.telenet-ops.be ([195.130.132.51]:35634)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maximedevos@telenet.be>) id 1nU9ZP-0002pC-OX
 for 54350@debbugs.gnu.org; Tue, 15 Mar 2022 11:58:49 -0400
Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be
 ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a])
 by baptiste.telenet-ops.be with bizsmtp
 id 6fyl2700F4UW6Th01fylzr; Tue, 15 Mar 2022 16:58:45 +0100
Message-ID: <b1c608f460465b7c4421aed44677f3a2f94302ec.camel@telenet.be>
Subject: Re: bug#54350: Profile collisions are ignored, installing multiple
 versions of the same package is silently broken
From: Maxime Devos <maximedevos@telenet.be>
To: Ludovic Courtès <ludo@gnu.org>
Date: Tue, 15 Mar 2022 16:58:40 +0100
In-Reply-To: <87zglrjpef.fsf@gnu.org>
References: <afde4231155f7fe32e709dc0d3a4c12d71ea8011.camel@telenet.be>
 <87zglrjpef.fsf@gnu.org>
Content-Type: multipart/signed; micalg="pgp-sha512";
 protocol="application/pgp-signature"; boundary="=-AoVoI7kH020S+4Bg1w+u"
User-Agent: Evolution 3.38.3-1 
MIME-Version: 1.0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22;
 t=1647359925; bh=+bzWxapZ9c0vTQ4qnuOQgwQDPSGzl0afAY7hkVLJcuo=;
 h=Subject:From:To:Cc:Date:In-Reply-To:References;
 b=Je5oznUueRkrK+zNS38tq9koDHjvCBmtlzKzC/mqnq7S8A+pgGaL3jj24O8s6UgJR
 E6a5kSdPlFoHWMS065OW7CTn9DJ4SyhqqSUvED0guhreeeWj9N1RqHK0Ocv67qZm0R
 3DfyQkDZ9z2nLbnutu8zaKbfrMk8dYjXKZfB93oUTzMhKcsMxuxV8A6M/ZVRMM6tm8
 ypDFHZ8aqk2givCHqJiXdRkAcSkm07qa0O8qsBLXg/abJz6OQxDn7lU5omYUK3RnXF
 mdTlrctmQ3nU4Dw/4wPb1MpqC71jMnS7SV+CUf7vRcRKqMhnE671yrIV4FNF8U/CUT
 5JkhPv3GXSMIQ==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 54350
Cc: 54350@debbugs.gnu.org
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request@debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit@debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request@debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request@debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
X-Spam-Score: -1.7 (-)
[Message part 1 (text/plain, inline)]
Ludovic Courtès schreef op di 15-03-2022 om 14:50 [+0100]:
> $ ./pre-inst-env guix shell -D guile -n
> guix shell: error: profile contains conflicting entries for bash-minimal
> guix shell: error:   first entry: bash-minimal@5.1.8 /gnu/store/chfwin3a4qp1znnpsjbmydr2jbzk0d6y-bash-minimal-5.1.8
> guix shell: error:   second entry: bash-minimal@5.1.8 /gnu/store/4y5m9lb8k3qkb1y9m02sw9w9a6hacd16-bash-minimal-5.1.8
> hint: You cannot have two different versions or variants of `bash-minimal' in the same profile.
> --8<---------------cut here---------------end--------------->8---
> 
> These collisions are harmless but frequent in package development
> environments, which is why ‘guix environment’ had to turn off those
> checks (commit afd06f605bf88a796acefc7ed598b43879346a6b).
> 
> That’s a bit of a hack though.

These collisions happen because the bag of a package contains of multiple
variants of bash: the default canonical bash-minimal, from (gnu packages
commencement), not directly visible (i.e., with "guix show" and
'specification->package'), which is overidden by the bash-minimal from
native-inputs, which is visible from specification->package and as a public
variable, and as I understand it, the bash-minimal supposed to end up
in the references of non-bootstrap packages.

For these kind of collisions, I think the non-canonical package (that's
actually visible with "guix show FOO") is preferred here, so perhaps
the canonical variants can be filtered out whenever that would resolve
a collision?

That seems also a bit of a hack though.

> What we could do, as a mitigation, is to enable collision checks
> unless there’s at least one ‘-D’ flag.  We’d also need to introduce
> ‘--allow-collisions’ for ‘guix shell’.

Special-casing -D like this also seems like a hack to me.  I'm not sure
which hack is better, though I prefer this one and the ‘filter out
canonical packages’ above the original ‘just disable collision
checking’.

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

Send a report that this bug log contains spam.


debbugs.gnu.org maintainers <help-debbugs@gnu.org>. Last modified: Sun Dec 22 11:40:19 2024; Machine Name: wallace-server

GNU bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.