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

Re: exif --remove not idempotent, and a Debian man page bug



On Mon, Sep 26, 2022 at 07:27:45PM -0400, The Wanderer wrote:
> My guess is: there's a collection of image files which (occasionally?)
> gets added to, he wants to clean up this data from the files in that
> collection that have it, and he doesn't want to have to keep track of
> which ones have and have not already been cleaned up in this way.
> 
> (Note: The rest is all speculative extrapolation from that starting
> point, and does not necessarily reflect what he actually thinks,
> *especially* if that starting point is not valid.)
> 
> Thus, he wants to run with '--remove' on every file unconditionally, and
> have that Do The Right Thing (including not writing out the file when
> there's no need to do so) in every case.
> 
> Since exif doesn't have that behavior, the answer is probably to do the
> detection separately from the remove command; I imagine there's probably
> a way to make exif tell you whether a given file has that data or not,
> and you could then use that output as input to an if statement to decide
> whether or not to run with '--remove'.
> 
> But he seems to feel that it's unreasonable to need to do that, because
> it would involve having to run each file that *does* need it through
> exif twice in a row rather than just once, and in principle it would be
> possible for exif to do the detection internally and avoid the need for
> this external logic.

Yeah, that matches my guess as well.  It's sad, isn't it, that the OP will
spend hours writing pedantic nonsense about the meaning of "idempotent"
or rants about how Debian maintainers should spend their time stripping
historical author identifications out of man pages, but won't spend five
minutes clearly writing out their goals.

Very early in the thread, I made the guess that "exif -o file1 file1"
would act like "sed -i ... file1", in the sense that it *always* writes
out a new file, even if no changes were made.  That guess turned out to
be correct.

The basic tools that are available in the free software universe are not
designed to handle *every* conceivable workflow.  They're meant to be
used in a specific set of ways, as envisioned by their author(s).  Any
additional uses that you can come up with for the tools are a bonus.

Tools that see a great deal of use get additional features added to them,
as the users, maintainers and even the original authors find new ways
to use them.

exif is NOT a tool that sees a lot of use.  Not compared to sed, grep,
and so on.  Expecting it to do things that *even sed doesn't do* is
kind of unreasonable.


Reply to: