Skip to content

comparators/deb: Fix matching for .deb archive members. (Closes: #903565)

Alexis Murzeau requested to merge amurzeau/diffoscope:master into master

my_members is iterated in DebContainer.perform_fuzzy_matching but is modified in Container.comparisons.prep_yield which remove the current item from my_members.

This causes a RuntimeError: OrderedDict mutated during iteration error. This was not detected by the existing test test_deb.test_compare_different_compression as it triggers only when there is more than one file in the .deb file. (That test use only one file: control.tar.{gz,xz}).

For the test fixtures, I could have modified the existing bug881937_x.deb files instead to just add the data.tar.{gz,xz} file but I preferred to create a new test case for that specific case. Let me know if having less fixtures is better (and so update bug881937_x.deb instead of creating new bug903565_x.deb).

Merge request reports

Loading