Bug#903446: diffoscope: libarchive.exception.ArchiveError: Unrecognized archive format (via comparators.debian) with lie/2.2.2+dfsg-3
Chris Lamb
lamby at debian.org
Fri Nov 9 17:11:31 GMT 2018
Gentile Mattia,
> I think the most proper thing to do would be to understand why it's not
> falling back to hex comparison when libarchive raises its exception?
We could have such a "brute force" solution indeed but poking very
quickly I think either the code or the comment is incorrect here:
@classmethod
def recognizes(cls, file):
"""Check if a file's type matches the one represented by this class.
The default test returns True if the file matches these tests:
(cls.FILE_TYPE_RE OR
cls.FILE_TYPE_HEADER_PREFIX) AND
(cls.FILE_EXTENSION_SUFFIX)
[..]
We don't match the string returned from file(1) (ie. "data") but we
match the FILE_EXTENSION_SUFFIX (".a"), yet we still return True
for StaticLibFile.recognizes.
>From my reading of the above, we should return False.
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby at debian.org / chris-lamb.co.uk
`-
More information about the Reproducible-builds
mailing list