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

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



On Wed 21 Sep 2022 at 14:46:55 (+0200), Emanuel Berg wrote:
> Greg Wooledge wrote:
> 
> > According to the package metadata, the Debian maintainer of
> > exif is:
> 
> OK, cool.
> 
> > Maintainer: Debian PhotoTools Maintainers
> > <pkg-phototools-devel@lists.alioth.debian.org>
> 
> They are CC'd, let's see what they say.
> 
> But: isn't it still a bug in the distribution man page to
> refer to mail address that bounces?

I hope the maintainers (Debian's) have better things to do than trawl
through email addresses in man pages. The man page has its origin and
date clearly indicated. The web and its search engines are still there.

> >>     <incal> for f in **/*.jpg; do exif --remove -o $f $f; done | grep 'Wrote
> >>             file' | wc -l # 2277 (1st invocation)
> >
> > I hope you're not using bash here. If you are, the "$f"
> > instances need to be double-quoted, or else this is going to
> > fail spectacularly on filenames with whitespace or
> > globbing characters.
> 
> zsh.

It would be polite to say that, as I think we're entitled to assume
bash unless otherwise indicted. (Perhaps dash, if it's a script
belonging to the system.)

> > I don't know what the intended behaviof of "exif --remove -o
> > file file" is. I'm imagining [...]
> 
> exif(1) which says on line 57 that --remove
> 
>   Remove the tag or (if no tag is specified) the entire IFD.
> 
> Only if it does, why is it there the next time to be removed
> as well?

Have you tried it?

> Maybe related to the '-o f f' part as your imagination
> tells you ...

Of course it is. Were there an option like --edit-in-place, then
one might imagine risking writing to the same file, but there isn't.

Actually testing it shows that exif behaves as if the -o
option is not there, and so you get a .modified.jpeg file.
It's up to you to overwrite the original.

> > In any case, if you want to file a Debian bug report, see
> > <https://www.debian.org/Bugs/>.
> 
> Let's figure it out first, maybe.

That wasn't difficult.

Cheers,
David.


Reply to: