Nikita Karetnikov <[email protected]> skribis:
>> Could you copy/paste the --format option found in (guix scripts
>> download)?
>
> I changed it a bit.
>
> (By the way, I'd like to add your copyright to the header of 'hash.scm'.
> What year should be used?)
2012, 2013
>>> Should we capitalize error messages?
>
>> No (info "(standards) Errors"): [...]
>
> OK, I prepended 'guix hash' to all messages. I'd like to change other
> commands (e.g., 'guix download') accordingly. What do you think?
I think it’d be nice to have a ‘warning’ procedure in (guix ui), so
things are uniform. Furthermore, ‘guix-main’ could do:
(parameterize ((current-script-name arg0))
...)
so that ‘warning’ and similar procedures could pick up the program name
from there.
Would you like to work on this, in a separate patch?
> I also want to change the output of 'guix download --help'. In
> particular, I'd like to specify the supported formats and remove
> (default: `nix-base32'). Basically, I want it to look like the output
> of 'guix hash --help'.
I was thinking that it might be enough to list the supported formats in
the manual, and not in --help, which should remain concise. WDYT?
>> Also, could you add an entry in the manual (with a couple of sentences
>> explaining when users should care about this tool, and what it does), as
>> well as a line in po/POTFILES.in?
>
> Done. But what is a translatable string? Is it a string that should be
> i18n'd?
Yes, introduced by a call to the ‘gettext’ procedure, of which ‘_’ is an alias.
> +@node Invoking guix hash
> +@section Invoking @command{guix hash}
> +
> +The @command{guix hash} command computes the cryptographic hash of a
> +file.
I would add something like: “It is primarily a convenience tool for
anyone contributing to the distribution: it reports the hash of a file,
as appears package definitions (@pxref{Defining Packages}).”
You could add an xref from “Defining Packages” too.
> +@command{guix hash} is a convenient tool to check the integrity of a
> +file. For example, it can be used to compute the hashes of bootstrap
> +binaries.
I would remove this paragraph.
> +There is also @code{guix download} which computes the hash of a remote
> +file.
I’d remove this sentence, and instead we should add a node for
guix download too (patch welcome! :-)).
Modulo these minor details, it looks good to me.
Thanks!
Ludo’.