Dear, It is probably more a feature than a bug (and it is expected, I guess). However, it can be misleading. For example, --8<---------------cut here---------------start------------->8--- $ guix package -i busybox diffutils -p /tmp/foo $ ls -l /tmp/foo/bin [..] df -> /gnu/store/…-busybox-1.31.1/bin/df diff -> /gnu/store/…-diffutils-3.7/bin/diff diff3 -> /gnu/store/…-diffutils-3.7/bin/diff3 dirname -> /gnu/store/…-busybox-1.31.1/bin/dirname [..] --8<---------------cut here---------------end--------------->8--- And the same result is obtained with the manifest.scm file: --8<---------------cut here---------------start------------->8--- (specifications->manifest '("diffutils" "busybox")) --8<---------------cut here---------------end--------------->8--- This difference could be counter-intuitive. One of the two lists should be internally reverse’d. WDYT? (Even if it is a corner-case, 2 packages providing the same tool, but it matters for <profile>/manifest.) All the best, simon
Hello zimoun,
> $ guix package -i busybox diffutils -p /tmp/foo
> $ ls -l /tmp/foo/bin
> [..]
> df -> /gnu/store/…-busybox-1.31.1/bin/df
> diff -> /gnu/store/…-diffutils-3.7/bin/diff
> diff3 -> /gnu/store/…-diffutils-3.7/bin/diff3
> dirname -> /gnu/store/…-busybox-1.31.1/bin/dirname
> [..]
The order of what appears in "bin" depends on both the name of the
binaries provided by both packages and also how the "ls" command decides
to sort its output. I'm not sure that much can be done here.
Thanks,
Mathieu
Hi Mathieu,
On Thu, 24 Sep 2020 at 15:08, Mathieu Othacehe <othacehe@gnu.org> wrote:
> The order of what appears in "bin" depends on both the name of the
> binaries provided by both packages and also how the "ls" command decides
> to sort its output. I'm not sure that much can be done here.
I have badly worded. The point is that "diffutils" and "busybox"
provide both the 'diff' binary. Therefore, depending on the order,
'diff' is provided by one or the other. Compare:
guix package -i busybox diffutils -p /tmp/busybox-diffutils
/tmp/busybox-diffutils/bin/diff
and
guix package -i diffutils busybox -p /tmp/diffutils-busybox
/tmp/diffutils-busybox/bin/diff
In the same time, compare the manifest.scm files:
--8<---------------cut here---------------start------------->8---
;;; busybox-diffutils.scm
(specifications->manifest '("busybox" "diffutils"))
;;; diffutils-busybox.scm
(specifications->manifest '("diffutils" "busybox"))
--8<---------------cut here---------------end--------------->8---
then
guix package -m busybox-diffutils.scm -p /tmp/busybox-diffutils-m
/tmp/busybox-diffutils-m/bin/diff
and
guix package -m diffutils-busybox.scm -p /tmp/diffutils-busybox-m
/tmp/diffutils-busybox-m/bin/diff
Concretely, "guix package" processes command-line arguments from right
to left. And the manifest.scm file read the list in order (so from
left to right).
All the best,
simon
PS:
For another example not related:
$ guix package --show=diffutils --show=busybox | recsel -C -p name
name: busybox
name: diffutils
and "guix show" corrects that, processing from left to right.
$ guix show diffutils busybox | recsel -C -p name
name: diffutils
name: busybox
Hey zimoun, Oh I see, thanks for explaining! It would be nice if the `guix package -i` command could also operate from left to right then. Would you like to give it a try? Thanks, Mathieu -- https://othacehe.org
Hi,
On Fri, 25 Sep 2020 at 13:54, Mathieu Othacehe <othacehe@gnu.org> wrote:
> It would be nice if the `guix package -i` command could also operate
> from left to right then. Would you like to give it a try?
I will not do. I am not interested any more. Closing?
Cheers,
simon