Hi, On Tue, 16 May 2023 at 16:41, Greg Hogan <c...@greghogan.com> wrote:
> I could not find documentation on this circumstance or how to resolve. > Both 'parallel' and 'moreutils' produce a 'bin/parallel' and only one > can go in the $GUIX_PROFILE. > > Creating a container, the latter package overshadows the former > package, as below. Unclear if this is consistent. In my manifest the > former package overshadows the latter (I'd prefer to have parallel's > parallel, but by default I have sorted the listing alphabetically). Is > there a better way to fix this? > > --8<---------------cut here---------------start------------->8--- > $ guix shell --container moreutils parallel which coreutils > [env]$ readlink -f `which parallel` > /gnu/store/xd9kbadmrrbpkjs9vl1v9rhgayfxwgbc-parallel-20230422/bin/parallel > > guix shell --container parallel moreutils which coreutils > [env]$ readlink -f $(which parallel) > /gnu/store/60zdm9zm0nqm5d97vs30sf4plb2ib5p9-moreutils-0.67/bin/parallel > --8<---------------cut here---------------end--------------->8--- Command-line is parsed from right to left. Therefore, it is consistent. However, when using manifest, it is parsed from left to right. See #43585 [1]. Compare: --8<---------------cut here---------------start------------->8--- $ cat moreutils-parallel.scm (specifications->manifest (list "moreutils" "parallel")) $ guix shell -C -m moreutils-parallel.scm coreutils which [env]$ readlink -f $(which parallel) /gnu/store/60zdm9zm0nqm5d97vs30sf4plb2ib5p9-moreutils-0.67/bin/parallel $ guix shell -C moreutils parallel coreutils which [env]$ readlink -f $(which parallel) /gnu/store/wi3j9z1s5pdna43ccyjf6c5pa1gnpg4x-parallel-20230622/bin/parallel --8<---------------cut here---------------end--------------->8--- versus --8<---------------cut here---------------start------------->8--- $ cat parallel-moreutils.scm (specifications->manifest (list "parallel" "moreutils")) $ guix shell -C -m parallel-moreutils.scm coreutils which [env]$ readlink -f $(which parallel) /gnu/store/wi3j9z1s5pdna43ccyjf6c5pa1gnpg4x-parallel-20230622/bin/parallel $ guix shell -C parallel moreutils coreutils which [env]$ readlink -f $(which parallel) /gnu/store/60zdm9zm0nqm5d97vs30sf4plb2ib5p9-moreutils-0.67/bin/parallel --8<---------------cut here---------------end--------------->8--- Well, I do not know if it is a feature or a bug. :-) Especially when command-lines are not all consistent. --8<---------------cut here---------------start------------->8--- $ guix show moreutils parallel | recsel -Cp name name: moreutils name: parallel $ guix show parallel moreutils | recsel -Cp name name: parallel name: moreutils --8<---------------cut here---------------end--------------->8--- Cheers, simon 1: https://issues.guix.gnu.org/43585#2