]> git.ipfire.org Git - thirdparty/elfutils.git/commit
debuginfod: populate _r_seekable on scan
authorOmar Sandoval <osandov@fb.com>
Tue, 23 Jul 2024 22:35:42 +0000 (15:35 -0700)
committerAaron Merey <amerey@redhat.com>
Wed, 24 Jul 2024 22:13:40 +0000 (18:13 -0400)
commit7c632c5c2ed8e75c8104278ef2bcff67b5596860
treeb023c0ea0ae4be90732946a74cee10ac4986200b
parentb2dd8b94d92bc14d144877374cf94d88030ec73b
debuginfod: populate _r_seekable on scan

Whenever a new archive is scanned, check if it is seekable with a little
liblzma magic, and populate _r_seekable if so.  With this, newly scanned
seekable archives will used the optimized extraction path added in the
previous commit.  Also add a test case using some artificial packages.

Signed-off-by: Omar Sandoval <osandov@fb.com>
12 files changed:
debuginfod/debuginfod.cxx
tests/Makefile.am
tests/debuginfod-debs/seekable-xz/compressme-seekable-xz-dbgsym_1.0-1_amd64.deb [new file with mode: 0644]
tests/debuginfod-debs/seekable-xz/compressme-seekable-xz_1.0-1.debian.tar.xz [new file with mode: 0644]
tests/debuginfod-debs/seekable-xz/compressme-seekable-xz_1.0-1.dsc [new file with mode: 0644]
tests/debuginfod-debs/seekable-xz/compressme-seekable-xz_1.0-1_amd64.deb [new file with mode: 0644]
tests/debuginfod-debs/seekable-xz/compressme-seekable-xz_1.0.orig.tar.xz [new file with mode: 0644]
tests/debuginfod-rpms/seekable-xz/compressme-seekable-xz-1.0-1.src.rpm [new file with mode: 0644]
tests/debuginfod-rpms/seekable-xz/compressme-seekable-xz-1.0-1.x86_64.rpm [new file with mode: 0644]
tests/debuginfod-rpms/seekable-xz/compressme-seekable-xz-debuginfo-1.0-1.x86_64.rpm [new file with mode: 0644]
tests/debuginfod-rpms/seekable-xz/compressme-seekable-xz-debugsource-1.0-1.x86_64.rpm [new file with mode: 0644]
tests/run-debuginfod-seekable.sh [new file with mode: 0755]