Control: tags 852476 confirmed pending

Olly Betts wrote...

> I can't see any mention of this change in either
> /usr/share/doc/file/changelog.Debian.gz or
> /usr/share/doc/file/changelog.gz so it isn't clear to me if this change
> was intentional or not.

> It looks like the cause is that two hunks were dropped from the patch
> local.support-local-definitions-in-etc-magic.patch between 5.28-4 and
> 5.29-1:

Thanks for the catch and the analysis, this was not intended. Just a
fallout in the attempt to debug #840754. Will take care of that in due
course.

> The documentation seems to not exactly match either behaviour - "man
> file" says:
> 
> | The information identifying these files is read from /etc/magic and
> | the compiled magic file /usr/share/misc/magic.mgc, or the files in the
> | directory /usr/share/misc/magic if the compiled file does not exist.
> | In addition, if $HOME/.magic.mgc or $HOME/.magic exists, it will be
> | used in preference to the system magic files.
> 
> The wording could perhaps be clearer, but that seems to imply that the
> default should actually be to search:
> 
> $HOME/.magic:/etc/magic:/usr/share/misc/magic

Um, are you saying the wording short rather be in the order of actual
probing so it was clearer - or is there something plain wrong?

According to strace, file(1) checks at the moment:

stat("$HOME/.magic.mgc", 0x7fff7a46d870) = -1 ENOENT (No such file or directory)
stat("$HOME/.magic", 0x7fff7a46d870) = -1 ENOENT (No such file or directory)
open("/usr/share/misc/magic.mgc", O_RDONLY) = 3

... which is how I read the manpage - modulo the lost /etc/magic I will
restore.

    Christoph

Attachment: signature.asc
Description: Digital signature

Reply via email to