Hi,

Konrad Hinsen <konrad.hin...@fastmail.net> skribis:

> Unfortunately, when there are several packages with identical name and
> version number in two channels, Guix silently chooses one of them.
> It would probably be more useful to emit a warning.

I believe that’s already the case.

Specifically, if there are several packages with the same name and
different versions, the newest one is picked up:

--8<---------------cut here---------------start------------->8---
$ guix build gcc-toolchain -n
/gnu/store/9h8cbavj4q7pq1590xsnjw71ww0d06gk-gcc-toolchain-14.2.0-debug
/gnu/store/x2kv3zw2k7ql211m5kvb6yw401gab0x9-gcc-toolchain-14.2.0
/gnu/store/9h5kczcvfxs2fgn9708cs70xi0xpjrw6-gcc-toolchain-14.2.0-static
--8<---------------cut here---------------end--------------->8---

When there are several matching packages with the given name and
version, you get a warning:

--8<---------------cut here---------------start------------->8---
$ guix build guile@2.2 -n
guix build: warning: ambiguous package specification `guile@2.2'
guix build: warning: choosing guile@2.2.7 from gnu/packages/guile.scm:287:2
The following files would be downloaded:
  /gnu/store/3qj7zmfq5cw5k37zf8qz9dr4kld8rsnd-guile-2.2.7-debug
  /gnu/store/0g5cbaf3xczis6x11j3h2xc1x1dpp3xk-guile-2.2.7
--8<---------------cut here---------------end--------------->8---

In Guix itself, there are no packages with the exact same name/version
pair though.  The example above is because there’s 2.2.7 and 2.2.4.

Ludo’.

Reply via email to