[Bug debuginfod/25583] Use libarchive to extract packages?

mark at klomp dot org sourceware-bugzilla@sourceware.org
Tue Feb 25 12:12:00 GMT 2020


Mark Wielaard <mark at klomp dot org> changed:

           What    |Removed                     |Added
                 CC|                            |mark at klomp dot org

--- Comment #2 from Mark Wielaard <mark at klomp dot org> ---
(In reply to Frank Ch. Eigler from comment #1)
> Interesting idea.  OTOH, rpm2cpio and dpkg binaries are not too hard to come
> by.
> One can experiment with the former already with git-master debuginfod with
> the
> "-Z .rpm" option instead of "-R".  Performance seems to be roughly the same.

If this works as well, then I would simply switch -R to:

diff --git a/debuginfod/debuginfod.cxx b/debuginfod/debuginfod.cxx
index 0acd70e4..c68aafa3 100644
--- a/debuginfod/debuginfod.cxx
+++ b/debuginfod/debuginfod.cxx
@@ -423,7 +423,7 @@ parse_opt (int key, char *arg,
     case 'F': scan_files = true; break;
     case 'R':
-      scan_archives[".rpm"]="rpm2cpio";
+      scan_archives[".rpm"]="cat";
     case 'U':
       scan_archives[".deb"]="dpkg-deb --fsys-tarfile";

It seems to just pass the run-debuginfod-find.sh testcase.

> The latter is less compelling in that it'd require hard-coding the inner
> data.tar.xz name and its processing ... meh.
> Maybe the status quo is good enough?

If we can get rid of some extra dependencies with the same performance and no
real downsides, except a couple of lines of extra code, I would go with this.
Of course, still needs someone to write those couple of extra lines of code.

You are receiving this mail because:
You are on the CC list for the bug.

More information about the Elfutils-devel mailing list