GNU bug report logs - #43585
Order in manifest and command-line differs

Previous Next

Package: guix;

Reported by: zimoun <zimon.toutoune <at> gmail.com>

Date: Wed, 23 Sep 2020 23:39:02 UTC

Severity: normal

Merged with 40382

To reply to this bug, email your comments to 43585 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#43585; Package guix. (Wed, 23 Sep 2020 23:39:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to zimoun <zimon.toutoune <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Wed, 23 Sep 2020 23:39:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: bug-guix <at> gnu.org
Subject: Order in manifest and command-line differs
Date: Thu, 24 Sep 2020 01:38:46 +0200
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





Information forwarded to bug-guix <at> gnu.org:
bug#43585; Package guix. (Thu, 24 Sep 2020 13:09:01 GMT) Full text and rfc822 format available.

Message #8 received at 43585 <at> debbugs.gnu.org (full text, mbox):

From: Mathieu Othacehe <othacehe <at> gnu.org>
To: zimoun <zimon.toutoune <at> gmail.com>
Cc: 43585 <at> debbugs.gnu.org
Subject: Re: bug#43585: Order in manifest and command-line differs
Date: Thu, 24 Sep 2020 15:08:38 +0200
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




Information forwarded to bug-guix <at> gnu.org:
bug#43585; Package guix. (Thu, 24 Sep 2020 14:09:01 GMT) Full text and rfc822 format available.

Message #11 received at 43585 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: Mathieu Othacehe <othacehe <at> gnu.org>
Cc: 43585 <at> debbugs.gnu.org
Subject: Re: bug#43585: Order in manifest and command-line differs
Date: Thu, 24 Sep 2020 16:08:06 +0200
Hi Mathieu,

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




Information forwarded to bug-guix <at> gnu.org:
bug#43585; Package guix. (Fri, 25 Sep 2020 11:55:02 GMT) Full text and rfc822 format available.

Message #14 received at 43585 <at> debbugs.gnu.org (full text, mbox):

From: Mathieu Othacehe <othacehe <at> gnu.org>
To: zimoun <zimon.toutoune <at> gmail.com>
Cc: 43585 <at> debbugs.gnu.org
Subject: Re: bug#43585: Order in manifest and command-line differs
Date: Fri, 25 Sep 2020 13:54:19 +0200
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




Information forwarded to bug-guix <at> gnu.org:
bug#43585; Package guix. (Wed, 09 Jun 2021 13:15:03 GMT) Full text and rfc822 format available.

Message #17 received at 43585 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: Mathieu Othacehe <othacehe <at> gnu.org>
Cc: 43585 <at> debbugs.gnu.org
Subject: Re: bug#43585: Order in manifest and command-line differs
Date: Wed, 31 Mar 2021 15:13:09 +0200
Hi,

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




Merged 40382 43585. Request was from Simon Tournier <zimon.toutoune <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 16 Jun 2025 11:51:04 GMT) Full text and rfc822 format available.

This bug report was last modified 61 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.