On Mon, Nov 23, 2015 at 5:24 PM, Pádraig Brady <[email protected]> wrote: > On 23/11/15 16:05, Jim Meyering wrote: >> On Mon, Nov 23, 2015 at 2:20 PM, Pádraig Brady <[email protected]> wrote: >>>> I'll push a bit later today. >>> >>> Pushed at >>> http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=v8.24-91-g9fd0662 >>> Marking http://bugs.gnu.org/15604 done >> >> Given how this warns/fails when using --check does nothing, >> >> $ :|sha1sum --check >> sha1sum: 'standard input': no properly formatted SHA1 checksum lines found >> [Exit 1] >> >> should using --check with --ignore-missing also warn/fail when it >> verifies no checksum? >> >> $ :|sha1sum |sed s/-/no-such/ |sha1sum --check --ignore-missing; echo $? >> 0 > > It's a fair point, but I see the first error as verifying the > checksum file itself, and so separate functionality. > > Related to this is outputting "MISSING" as well as "OK" > unless --quiet is specified, though I thought the lack > of "OK" if no files found would be enough indication > of an issue in the normal usage?
I think a common expected usage of --ignore-missing would be the case of an SHA1SUM file listing all possibly-verified files for which it is common to verify only the one or two downloaded files. In any invocation that ends up ignoring *all* file names, I would want a loud warning and failure, to be sure that my eyes (and/or any tool) notice something is wrong. The absence of an "OK" is far easier to miss than a diagnostic. At least a few are often expected to be missing, so I see little value in emitting "MISSING" diagnostics.
