bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#15604: [coreutils] [PATCH] md5sum: Add option to ignore non-existant


From: Jim Meyering
Subject: bug#15604: [coreutils] [PATCH] md5sum: Add option to ignore non-existant files
Date: Mon, 23 Nov 2015 18:53:48 +0100

On Mon, Nov 23, 2015 at 6:24 PM, Pádraig Brady <address@hidden> wrote:
> On 23/11/15 16:41, Jim Meyering wrote:
>> 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.
>
> Yes I agree. Thinking more, one could have a syntactically correct
> checksum file which is adjusted to comment out certain entries, and
> currently sha1sum etc. (with or without --ignore-missing)
> will error out unless something is verified:
>
> $ echo '#'|sha1sum --check --ignore-missing
> sha1sum: standard input: no properly formatted SHA1 checksum lines found
>
> So given that the existing functionality is to ensure something is verified,
> then --ignore-missing should be consistent.
>
> I'll push the attached a bit later.

Thank you.
That looks great.

Only suggestions are barely worth mentioning.
When negating, I'm pretty sure the grammar police suggest to use singular:

-            error (0, 0, _("%s: no files were verified"),
+            error (0, 0, _("%s: no file was verified"),

Also, please insert the comma in this log message sentence:

  * src/md5sum.c (digest_check): Update a matched_checksums bool upon
  matched checksum, and fail (loudly unless --status is specified)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]