GNU bug report logs

#54350 'guix shell' skips profile collision checks

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

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

Received: (at 54350) by debbugs.gnu.org; 15 Mar 2022 13:50:44 +0000
From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 15 09:50:44 2022
Received: from localhost ([127.0.0.1]:47859 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1nU7ZT-0000rK-Os
	for submit@debbugs.gnu.org; Tue, 15 Mar 2022 09:50:44 -0400
Received: from eggs.gnu.org ([209.51.188.92]:39118)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@gnu.org>) id 1nU7ZR-0000qt-4y
 for 54350@debbugs.gnu.org; Tue, 15 Mar 2022 09:50:41 -0400
Received: from [2001:470:142:3::e] (port=37958 helo=fencepost.gnu.org)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@gnu.org>)
 id 1nU7ZL-0000pB-6M; Tue, 15 Mar 2022 09:50:35 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To:
 From; bh=DttyBePnLQuutd2IgNkU7VrJ2iuRVVdV0AYTSTlImtw=; b=m7qZjfot7NY2mDlScrIc
 ikRhzELPB4FnHVSZThWcaXy9BZbRcHl4PoCC+fPCCPgirwbGJio5cBzjS0ROUk+h65Neivg/LHjt5
 USvIjcJtZ1l/YwrIXHmS6s23iGULMYp5H1HLrEdaut54gXOhmfVSqyADrEJ8QUWf9iJ5FB2U9gOKA
 0F7BsCY0Wl4sWCz0FpgAVKFHX6W40AWbCiuGfxqXA9g+UupRsbGgiRFnUrNFElax+EmdLm6TAtF7d
 5jAZw+Y5S+PHXh5ahLhqP64xglD1V8azN8Vsye9K+7NhNPS4gPLUH9ZJ70ZNJYe5Y24YrNsg5jYfe
 7mn/15RBZHMxBw==;
Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=38542 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@gnu.org>)
 id 1nU7ZK-00017s-PT; Tue, 15 Mar 2022 09:50:35 -0400
From: Ludovic Courtès <ludo@gnu.org>
To: Maxime Devos <maximedevos@telenet.be>
Subject: Re: bug#54350: Profile collisions are ignored, installing multiple
 versions of the same package is silently broken
References: <afde4231155f7fe32e709dc0d3a4c12d71ea8011.camel@telenet.be>
Date: Tue, 15 Mar 2022 14:50:32 +0100
In-Reply-To: <afde4231155f7fe32e709dc0d3a4c12d71ea8011.camel@telenet.be>
 (Maxime Devos's message of "Sat, 12 Mar 2022 10:45:46 +0100")
Message-ID: <87zglrjpef.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-Spam-Score: -2.3 (--)
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: -3.3 (---)
Hi,

Maxime Devos <maximedevos@telenet.be> skribis:

> $ guix shell --pure bash pango@1.42 pango@1.48
> $ ~/.guix-profile/bin/ls -l $GUIX_ENVIRONMENT/lib/libpango*.so
>
> Result:
> [...]/lib/libpango-1.0.so -> [...]-pango-1.42.4/lib/libpango-1.0.so
> [...]/lib/libpangocairo-1.0.so -> [...]-pango-1.42.4/lib/libpangocairo-1.0.so
> [...]/lib/libpangoft2-1.0.so -> [...]-1.42.4/lib/libpangoft2-1.0.so
> [...]/lib/libpangoxft-1.0.so -> [...]-pango-1.42.4/lib/libpangoxft-1.0.so
>
> Question: how does this even work?  Aren't error messages about profile
> collisions a thing?

Unlike ‘guix package’, ‘guix environment/shell’ explicitly disables
collision checks—see #:allow-collisions? in environment.scm.

The rationale back then was that if you do:

  guix shell -D guile

then you likely end up with profile collisions, like so (I modified the
code to do #:allow-collisions? #f):

--8<---------------cut here---------------start------------->8---
$ ./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.

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’.

WDYT?

Thanks,
Ludo’.




Send a report that this bug log contains spam.


debbugs.gnu.org maintainers <help-debbugs@gnu.org>. Last modified: Sun Dec 22 11:44:24 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.