guix commands should print a message, if they produce only trivial output by default

  • Open
  • quality assurance status badge
Details
2 participants
  • Björn Höfling
  • swedebugia
Owner
unassigned
Submitted by
Björn Höfling
Severity
normal
B
B
Björn Höfling wrote on 25 Feb 2019 17:24
(address . bug-guix@gnu.org)
20190225172456.242b2df0@alma-ubu
I noticed that if you call "guix COMMAND" for some COMMANDs without any
options given, they produce something which is not very useful to the
user. I first noticed it with guix pack:

When "guix pack" is run without any options, it builds an empty pack:

$ guix pack
/gnu/store/2ys9fn6h95209piqhyxli5pf2c4mp7zp-tarball-pack.tar.gz
$ tar tzvf /gnu/store/2ys9fn6h95209piqhyxli5pf2c4mp7zp-tarball-pack.tar.gz
drwxrwxr-t root/root 0 1970-01-01 01:00 ./gnu/store/
dr-xr-xr-x root/root 0 1970-01-01 01:00 ./gnu/store/w659mjmzwyhv62sd35y2pv5nrg5xkl7j-profile/
dr-xr-xr-x root/root 0 1970-01-01 01:00 ./gnu/store/w659mjmzwyhv62sd35y2pv5nrg5xkl7j-profile/etc/
-r--r--r-- root/root 414 1970-01-01 01:00 ./gnu/store/w659mjmzwyhv62sd35y2pv5nrg5xkl7j-profile/etc/profile
-r--r--r-- root/root 37 1970-01-01 01:00 ./gnu/store/w659mjmzwyhv62sd35y2pv5nrg5xkl7j-profile/manifest

I think from a user perspective it would be better to print a help
message and not build an empty pack.

On the other hand, I tried out other guix commands and at least it is a
consistent behaviour, they start with the default values, like "guix
graph" outputs just an empty graph.

"guix system" complains it needs a subcommand, which is a different
case.

But then again we have this complaint:

guix system container
guix system: error: wrong number of arguments for action 'container'

WDYT?

Björn
-----BEGIN PGP SIGNATURE-----

iF0EARECAB0WIQQiGUP0np8nb5SZM4K/KGy2WT5f/QUCXHQW2AAKCRC/KGy2WT5f
/WmEAJwIIET9q/sUZ5MKQCb3aOg/arCFagCdEaILYWTvBC8v1rN+r8J0C+JqSSU=
=Hvlu
-----END PGP SIGNATURE-----


S
S
swedebugia wrote on 1 Mar 2019 18:29
98955B3B-8AD5-4C65-B382-73624318B166@riseup.net
"Björn Höfling" <bjoern.hoefling@bjoernhoefling.de> skrev: (25 februari 2019 17:24:56 CET)
Toggle quote (39 lines)
>I noticed that if you call "guix COMMAND" for some COMMANDs without any
>options given, they produce something which is not very useful to the
>user. I first noticed it with guix pack:
>
>When "guix pack" is run without any options, it builds an empty pack:
>
>$ guix pack
>/gnu/store/2ys9fn6h95209piqhyxli5pf2c4mp7zp-tarball-pack.tar.gz
>$ tar tzvf
>/gnu/store/2ys9fn6h95209piqhyxli5pf2c4mp7zp-tarball-pack.tar.gz
>drwxrwxr-t root/root 0 1970-01-01 01:00 ./gnu/store/
>dr-xr-xr-x root/root 0 1970-01-01 01:00
>./gnu/store/w659mjmzwyhv62sd35y2pv5nrg5xkl7j-profile/
>dr-xr-xr-x root/root 0 1970-01-01 01:00
>./gnu/store/w659mjmzwyhv62sd35y2pv5nrg5xkl7j-profile/etc/
>-r--r--r-- root/root 414 1970-01-01 01:00
>./gnu/store/w659mjmzwyhv62sd35y2pv5nrg5xkl7j-profile/etc/profile
>-r--r--r-- root/root 37 1970-01-01 01:00
>./gnu/store/w659mjmzwyhv62sd35y2pv5nrg5xkl7j-profile/manifest
>
>I think from a user perspective it would be better to print a help
>message and not build an empty pack.
>
>On the other hand, I tried out other guix commands and at least it is a
>consistent behaviour, they start with the default values, like "guix
>graph" outputs just an empty graph.
>
>"guix system" complains it needs a subcommand, which is a different
>case.
>
>But then again we have this complaint:
>
>guix system container
>guix system: error: wrong number of arguments for action 'container'
>
>WDYT?
>
>Björn

I think we should print helpful hints or the contents of --help in these situations.
--
Sent from my k-9 mail for Android.
Attachment: file
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 34651@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 34651
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch