aboutsummaryrefslogtreecommitdiff
path: root/archival/rpm2cpio.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2017-08-09 18:20:01 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2017-08-09 18:20:01 +0200
commit9be166b5dd5161ea537d662660cc0142aa2db92b (patch)
tree2c3fd12f8d4c3321fcddf231cb6db9f1818c1d76 /archival/rpm2cpio.c
parentcde46f75cbe8069e06b68396a7f6dc9564fbf2c4 (diff)
downloadbusybox-9be166b5dd5161ea537d662660cc0142aa2db92b.tar.gz
rpm: code shrink
function old new delta rpm_getstr0 - 7 +7 rpm_getstr 112 110 -2 rpm_getint 120 118 -2 bsearch_rpmtag 15 13 -2 shell_builtin_read 1334 1320 -14 rpm_main 1548 1474 -74 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/5 up/down: 7/-94) Total: -87 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'archival/rpm2cpio.c')
-rw-r--r--archival/rpm2cpio.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/archival/rpm2cpio.c b/archival/rpm2cpio.c
index 3e4a6a249..a6db19c13 100644
--- a/archival/rpm2cpio.c
+++ b/archival/rpm2cpio.c
@@ -75,11 +75,14 @@ int rpm2cpio_main(int argc UNUSED_PARAM, char **argv)
/* Skip the main header */
skip_header();
- //if (SEAMLESS_COMPRESSION)
+ //if (SEAMLESS_COMPRESSION) - we do this at the end instead.
// /* We need to know whether child (gzip/bzip/etc) exits abnormally */
// signal(SIGCHLD, check_errors_in_children);
- /* This works, but doesn't report uncompress errors (they happen in child) */
+//TODO: look for rpm tag RPMTAG_PAYLOADCOMPRESSOR (dec 1125, hex 0x465),
+// if the value is "lzma", set up decompressor without detection
+// (lzma can't be detected).
+
setup_unzip_on_fd(rpm_fd, /*fail_if_not_compressed:*/ 1);
if (bb_copyfd_eof(rpm_fd, STDOUT_FILENO) < 0)
bb_error_msg_and_die("error unpacking");