1. 21 May, 2018 1 commit
  2. 18 Mar, 2018 1 commit
  3. 21 Sep, 2017 1 commit
  4. 09 Sep, 2017 3 commits
  5. 03 Jan, 2017 1 commit
  6. 28 Dec, 2016 3 commits
  7. 27 Dec, 2016 1 commit
  8. 18 Dec, 2016 1 commit
  9. 24 Aug, 2016 1 commit
  10. 15 Aug, 2016 2 commits
  11. 09 Aug, 2016 1 commit
  12. 15 Dec, 2015 1 commit
    • Jérémy Bobbio's avatar
      Prevent CBFS comparator from scanning big files needlessly · 15981bcf
      Jérémy Bobbio authored
      To recognize CBFS images, we fall back on looking for the magic number
      by scanning the entire file. This is expensive! In order to speed up
      diffoscope, we assume that any file bigger than 24 MiB will not be a CBFS
      image. That's a reasonable assumption given that, as of today, the biggest
      image produced by coreboot is 16 MiB.
      We also now try to identify CBFS images last. This means other formats have a
      chance to be recognized before the file gets fully scanned.
      Thanks Mike Hommey for the detailed bug report and suggestions.
      Closes: #807997
  13. 05 Dec, 2015 3 commits
    • Jérémy Bobbio's avatar
      Always compare container content if applicable · af6a0f09
      Jérémy Bobbio authored
      Now that we have a common interface for containers, we can compare their
      content as part of the default procedure. This saves having to do so
      in every compare_details() methods.
    • Jérémy Bobbio's avatar
      Make container class available on demand instead of bracketing · c359af51
      Jérémy Bobbio authored
      To access the content of a container, we used to require call to the open()
      method. Such bracketed operation makes it difficult to implement parallel
      processing. Instead, we now make container objects associated with a given file
      type available through the as_container property.
      The as_container property will lazily initialize an associated container
      object. The reference to the container object will be removed when the
      cleanup() method is called. Ressource can thus be deallocated on garbage
      With this change, we can finally make Container.compare() return an iterator
      that can be lazily consumed instead of an evaluated list: the various files that
      need to be extracted to perform the comparisosn will be made available when
      File types which can be treated as containers must now define the
      CONTAINER_CLASS constant to point at a Container subclass handling this
      particular file type.
    • Jérémy Bobbio's avatar
      Use lazy extraction instead of explicit bracketing · 303aee94
      Jérémy Bobbio authored
      Previously, code requiring access to file content had to be explicitly
      bracketed using get_content() for files to be extracted and then deleted.
      Such construction is problematic for parallel processing as a file might be
      processed be multiple operations currently (e.g. multiple files being extracted
      from a unique archive at the same time).
      We thus removes the get_content() context and @needs_content decorator to
      prefer lazy path initialization: actual content will be made available through
      the path property. The extraction will happen then if necessary.
      The extracted file should normally be deleted when Python garbage collector
      reclaims the object. As a safety net, we still have a global registry of all
      temporary files and directories and remove them on exit.
  14. 15 Oct, 2015 2 commits
    • Jérémy Bobbio's avatar
      Read Haskell interfaces in binary mode · e26a9dea
      Jérémy Bobbio authored
      Otherwise, we'll get Unicode decode errors. Bad.
      Closes: #801333
    • Jérémy Bobbio's avatar
      Add support for CBFS images · 5ebe5f82
      Jérémy Bobbio authored
      This requires cbfstool which is not available in Debian (yet?). We need to
      change `--list-tools` to cope with a tool that has no matching package.
      We restrict looking for a CBFS header in the whole image (which takes some
      time) to cases where the file name ends with `.rom`.
      Closes: #788364