unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxime Devos <maximedevos@telenet.be>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 54350@debbugs.gnu.org
Subject: bug#54350: Profile collisions are ignored, installing multiple versions of the same package is silently broken
Date: Tue, 15 Mar 2022 16:58:40 +0100	[thread overview]
Message-ID: <b1c608f460465b7c4421aed44677f3a2f94302ec.camel@telenet.be> (raw)
In-Reply-To: <87zglrjpef.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 2048 bytes --]

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.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

  reply	other threads:[~2022-03-15 15:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-12  9:45 bug#54350: Profile collisions are ignored, installing multiple versions of the same package is silently broken Maxime Devos
2022-03-12 14:34 ` Liliana Marie Prikler
2022-03-15 13:50 ` Ludovic Courtès
2022-03-15 15:58   ` Maxime Devos [this message]
2022-03-16 10:18     ` Ludovic Courtès
2022-03-16 20:31   ` Greg Hogan
2023-12-12 13:10 ` bug#54350: Profile collisions in "guix shell" Konrad Hinsen
2023-12-15  6:51   ` Konrad Hinsen
2024-01-16 18:36 ` Suhail

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b1c608f460465b7c4421aed44677f3a2f94302ec.camel@telenet.be \
    --to=maximedevos@telenet.be \
    --cc=54350@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).