diff options
| author | Ross Burton <ross.burton@arm.com> | 2024-09-27 16:33:31 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-09-30 17:07:17 +0100 |
| commit | 7fe641536e84674afc40a61feff8a2c0610d27e1 (patch) | |
| tree | f945f794ae8119671e14416a9191683cc8121ab4 /meta/recipes-devtools/python | |
| parent | d3a98ba77184a9863a037e5145772d51953ef796 (diff) | |
| download | poky-7fe641536e84674afc40a61feff8a2c0610d27e1.tar.gz | |
python3-libarchive-c: fix tests with libarchive 3.7.5 onwards
Backport a patch from an upstream PR to disable a test that correctly
causes errors in libarchive 3.7.5 onwards.
(From OE-Core rev: 51356c6d6774894926c9a291b9313324cfd6b127)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python')
| -rw-r--r-- | meta/recipes-devtools/python/python3-libarchive-c/new-libarchive.patch | 41 | ||||
| -rw-r--r-- | meta/recipes-devtools/python/python3-libarchive-c_5.1.bb | 1 |
2 files changed, 42 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python3-libarchive-c/new-libarchive.patch b/meta/recipes-devtools/python/python3-libarchive-c/new-libarchive.patch new file mode 100644 index 0000000000..681e03a465 --- /dev/null +++ b/meta/recipes-devtools/python/python3-libarchive-c/new-libarchive.patch | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | From adb206946721a4f5bd1190ab9c975bab4373e35c Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Changaco <changaco@changaco.oy.lc> | ||
| 3 | Date: Fri, 27 Sep 2024 11:51:22 +0200 | ||
| 4 | Subject: [PATCH] update a test failing with new libarchive versions | ||
| 5 | |||
| 6 | fixes #130 | ||
| 7 | |||
| 8 | Upstream-Status: Submitted [https://github.com/Changaco/python-libarchive-c/pull/131] | ||
| 9 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
| 10 | --- | ||
| 11 | tests/test_entry.py | 10 ++++++++-- | ||
| 12 | 1 file changed, 8 insertions(+), 2 deletions(-) | ||
| 13 | |||
| 14 | diff --git a/tests/test_entry.py b/tests/test_entry.py | ||
| 15 | index 419cecb..34543a5 100644 | ||
| 16 | --- a/tests/test_entry.py | ||
| 17 | +++ b/tests/test_entry.py | ||
| 18 | @@ -9,7 +9,7 @@ | ||
| 19 | |||
| 20 | import pytest | ||
| 21 | |||
| 22 | -from libarchive import memory_reader, memory_writer | ||
| 23 | +from libarchive import ArchiveError, memory_reader, memory_writer | ||
| 24 | from libarchive.entry import ArchiveEntry, ConsumedArchiveEntry, PassedArchiveEntry | ||
| 25 | |||
| 26 | from . import data_dir, get_entries, get_tarinfos | ||
| 27 | @@ -64,7 +64,13 @@ def test_check_ArchiveEntry_against_TarInfo(): | ||
| 28 | |||
| 29 | |||
| 30 | def test_check_archiveentry_using_python_testtar(): | ||
| 31 | - check_entries(join(data_dir, 'testtar.tar')) | ||
| 32 | + # This test behaves differently depending on the libarchive version: | ||
| 33 | + # 3.5, 3.6 and presumably all future versions reject the archive as damaged, | ||
| 34 | + # whereas older versions accepted it. | ||
| 35 | + try: | ||
| 36 | + check_entries(join(data_dir, 'testtar.tar')) | ||
| 37 | + except ArchiveError as e: | ||
| 38 | + assert e.msg == "Damaged tar archive" | ||
| 39 | |||
| 40 | |||
| 41 | def test_check_archiveentry_with_unicode_and_binary_entries_tar(): | ||
diff --git a/meta/recipes-devtools/python/python3-libarchive-c_5.1.bb b/meta/recipes-devtools/python/python3-libarchive-c_5.1.bb index c8aff3defe..3116c6b62e 100644 --- a/meta/recipes-devtools/python/python3-libarchive-c_5.1.bb +++ b/meta/recipes-devtools/python/python3-libarchive-c_5.1.bb | |||
| @@ -6,6 +6,7 @@ LICENSE = "CC0-1.0" | |||
| 6 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=bcab380227a83bc147350b40a81e6ffc" | 6 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=bcab380227a83bc147350b40a81e6ffc" |
| 7 | 7 | ||
| 8 | SRC_URI += " \ | 8 | SRC_URI += " \ |
| 9 | file://new-libarchive.patch \ | ||
| 9 | file://run-ptest \ | 10 | file://run-ptest \ |
| 10 | " | 11 | " |
| 11 | 12 | ||
