]> 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 14:13:59 +0000 (10:13 -0400)
commit492a9d5561e49e618de44785c7ff822f0f806b2f
tree78c0a4e568a003fb68991839099c455e9940c7dc
parent9245ece15f2ead740c1a4e35a1eaf834401075c1
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]