[File] Regression in pgp mime type detection
Christos Zoulas
christos at zoulas.com
Fri Dec 9 17:59:09 UTC 2022
On 2022-12-06 3:00 pm, Christoph Biedl wrote:
> Christoph Biedl wrote...
>
> [ garbage ]
>
> Sorry, let me try again.
>
> Debian bug report #1022565: https://bugs.debian.org/1022565
>
> There is a regression in the mime type detection of (some?) keyring
> files, file(1) now returns "application/octet-stream" instead of
> "application/pgp-keys".
>
> To reproduce, run: file --mime debian-archive-buster-stable.gpg
>
> Using git bisect, this led to
>
> commit ac7cdbd100713bacbd993e2c67242dbc4e9a501d (refs/bisect/bad)
> Author: Christos Zoulas <christos at zoulas.com>
> Date: Thu Jul 1 07:51:35 2021 +0000
>
> PR/272: kiefermat: Only set returnval = 1 when we printed something
> (in all
> cases print or !print). This simplifies the logic and fixes the
> issue in the
> PR with -k and --mime-type there was no continuation printed before
> the
> default case.
>
> but honestly I failed to understand how this is related. However, I
> checked all commits between FILE5_40 and FILE5_41, this is indeed the
> commit where the behaviour changed.
Fixed, but this is a horrible mess and needs to be re-thought and
re-written
because the logic is too complicated for its own sake.
christos
More information about the File
mailing list