* bug#43585: Order in manifest and command-line differs
@ 2020-09-23 23:38 zimoun
2020-09-24 13:08 ` Mathieu Othacehe
0 siblings, 1 reply; 5+ messages in thread
From: zimoun @ 2020-09-23 23:38 UTC (permalink / raw)
To: 43585
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#43585: Order in manifest and command-line differs
2020-09-23 23:38 bug#43585: Order in manifest and command-line differs zimoun
@ 2020-09-24 13:08 ` Mathieu Othacehe
2020-09-24 14:08 ` zimoun
0 siblings, 1 reply; 5+ messages in thread
From: Mathieu Othacehe @ 2020-09-24 13:08 UTC (permalink / raw)
To: zimoun; +Cc: 43585
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#43585: Order in manifest and command-line differs
2020-09-24 13:08 ` Mathieu Othacehe
@ 2020-09-24 14:08 ` zimoun
2020-09-25 11:54 ` Mathieu Othacehe
0 siblings, 1 reply; 5+ messages in thread
From: zimoun @ 2020-09-24 14:08 UTC (permalink / raw)
To: Mathieu Othacehe; +Cc: 43585
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#43585: Order in manifest and command-line differs
2020-09-24 14:08 ` zimoun
@ 2020-09-25 11:54 ` Mathieu Othacehe
2021-03-31 13:13 ` zimoun
0 siblings, 1 reply; 5+ messages in thread
From: Mathieu Othacehe @ 2020-09-25 11:54 UTC (permalink / raw)
To: zimoun; +Cc: 43585
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#43585: Order in manifest and command-line differs
2020-09-25 11:54 ` Mathieu Othacehe
@ 2021-03-31 13:13 ` zimoun
0 siblings, 0 replies; 5+ messages in thread
From: zimoun @ 2021-03-31 13:13 UTC (permalink / raw)
To: Mathieu Othacehe; +Cc: 43585
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-06-09 19:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-23 23:38 bug#43585: Order in manifest and command-line differs zimoun
2020-09-24 13:08 ` Mathieu Othacehe
2020-09-24 14:08 ` zimoun
2020-09-25 11:54 ` Mathieu Othacehe
2021-03-31 13:13 ` zimoun
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).