summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@redhat.com>2020-02-25 14:27:33 -0500
committerFrank Ch. Eigler <fche@redhat.com>2020-02-25 14:30:45 -0500
commit37d56e9275fcf70c4a0cb19c0f2ac1d4032acfab (patch)
tree47900d3cc232126bcd323f14af7d92d8db22500b
parent577170fc84e1a347076bc6150a7b152da0a882ac (diff)
downloadelfutils-37d56e9275fcf70c4a0cb19c0f2ac1d4032acfab.tar.gz
debuginfod PR25583: map -R to -Z.rpm
It was reported that libarchive (bsdtar) at least as far back as rhel7 (3.1.2) can natively process RPM files, so there's no need to mediate those accesses through rpm2cpio. There's no noteworthy performance or testing impact. Signed-off-by: Frank Ch. Eigler <fche@redhat.com> Signed-off-by: Mark Wielaard <mark@klomp.org>
-rw-r--r--debuginfod/ChangeLog4
-rw-r--r--debuginfod/debuginfod.cxx2
-rw-r--r--doc/ChangeLog4
-rw-r--r--doc/debuginfod.83
4 files changed, 11 insertions, 2 deletions
diff --git a/debuginfod/ChangeLog b/debuginfod/ChangeLog
index 4bbe0d35..16e14309 100644
--- a/debuginfod/ChangeLog
+++ b/debuginfod/ChangeLog
@@ -1,5 +1,9 @@
2020-02-25 Frank Ch. Eigler <fche@redhat.com>
+ * debuginfod.cxx (parse_opt): Treat -R as if -Z.rpm .
+
+2020-02-25 Frank Ch. Eigler <fche@redhat.com>
+
* debuginfod.cxx (fdcache_prefetch): New parameter.
(parse_opt): Parse it.
(main): Default it.
diff --git a/debuginfod/debuginfod.cxx b/debuginfod/debuginfod.cxx
index be3868bb..7c7e85eb 100644
--- a/debuginfod/debuginfod.cxx
+++ b/debuginfod/debuginfod.cxx
@@ -426,7 +426,7 @@ parse_opt (int key, char *arg,
break;
case 'F': scan_files = true; break;
case 'R':
- scan_archives[".rpm"]="rpm2cpio";
+ scan_archives[".rpm"]="cat"; // libarchive groks rpm natively
break;
case 'U':
scan_archives[".deb"]="dpkg-deb --fsys-tarfile";
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 3e57491c..76445412 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,5 +1,9 @@
2020-02-25 Frank Ch. Eigler <fche@redhat.com>
+ * debuginfod.8: Note that -R works just like -Z.rpm .
+
+2020-02-25 Frank Ch. Eigler <fche@redhat.com>
+
* debuginfod.8: Document new --fdcache-prefetch option.
2020-02-05 Frank Ch. Eigler <fche@redhat.com>
diff --git a/doc/debuginfod.8 b/doc/debuginfod.8
index ed9724d6..32fca6c4 100644
--- a/doc/debuginfod.8
+++ b/doc/debuginfod.8
@@ -99,7 +99,8 @@ additional patterns. This option may be repeated.
.TP
.B "\-R"
Activate RPM patterns in archive scanning. The default is off.
-Equivalent to \fB\%\-Z\~.rpm=rpm2cpio\fP.
+Equivalent to \fB\%\-Z\~.rpm=cat\fP, since libarchive can natively
+process RPM archives.
.TP
.B "\-U"