]> git.ipfire.org Git - thirdparty/elfutils.git/commit
debuginfod: populate _r_seekable on scan
authorOmar Sandoval <osandov@fb.com>
Fri, 19 Jul 2024 18:24:37 +0000 (11:24 -0700)
committerAaron Merey <amerey@redhat.com>
Tue, 23 Jul 2024 20:20:30 +0000 (16:20 -0400)
commitbea0579da1258b4e4cb6ad7050ea6c7952ac8c27
treead28dd0f5aca28d589ddac977b2fb60c63b52977
parent3eea7980d29c7573c9e0af70892b941bbcfd4fdb
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]