Skip to content
Snippets Groups Projects
Commit dc9ee98b authored by Chris Lamb's avatar Chris Lamb :eyes:
Browse files

Support .deb archives that contain an uncompressed control.tar. Thanks to...

Support .deb archives that contain an uncompressed control.tar. Thanks to Roderich Schupp <roderich.schupp@gmail.com> for the bug report. (Closes: #903391)
parent 013bebdb
No related branches found
No related tags found
No related merge requests found
Pipeline #12768 failed
......@@ -110,7 +110,7 @@ class DebFile(File):
control_tar = self.as_container.control_tar
md5sums_file = control_tar.as_container.lookup_file(
'./md5sums') if control_tar else None
if md5sums_file:
if isinstance(md5sums_file, Md5sumsFile):
self._md5sums = md5sums_file.parse()
else:
logger.debug("Unable to find a md5sums file")
......
......@@ -130,6 +130,8 @@ def test_compare_non_existing(monkeypatch, deb1):
bug881937_deb1 = load_fixture('bug881937_1.deb')
bug881937_deb2 = load_fixture('bug881937_2.deb')
bug903391_deb1 = load_fixture('bug903391_1.deb')
bug903391_deb2 = load_fixture('bug903391_2.deb')
@skip_unless_tools_exist('xz')
......@@ -139,3 +141,7 @@ def test_compare_different_compression(bug881937_deb1, bug881937_deb2):
assert difference.details[1].source2 == 'control.tar.xz'
expected_diff = get_data('bug881937_control_expected_diff')
assert difference.details[1].details[2].details[1].unified_diff == expected_diff
def test_uncompressed_control_tar(bug903391_deb1, bug903391_deb2):
bug903391_deb1.compare(bug903391_deb2)
File added
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment