bug#43585: Order in manifest and command-line differs

2020-09-23 Thread zimoun
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 /manifest.)

All the best,
simon






bug#43585: Order in manifest and command-line differs

2020-09-24 Thread Mathieu Othacehe


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





bug#43585: Order in manifest and command-line differs

2020-09-24 Thread zimoun
Hi Mathieu,

On Thu, 24 Sep 2020 at 15:08, Mathieu Othacehe  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





bug#43585: Order in manifest and command-line differs

2020-09-25 Thread Mathieu Othacehe


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





bug#43585: Order in manifest and command-line differs

2021-06-09 Thread zimoun
Hi,

On Fri, 25 Sep 2020 at 13:54, Mathieu Othacehe  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