From 9be166b5dd5161ea537d662660cc0142aa2db92b Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Wed, 9 Aug 2017 18:20:01 +0200 Subject: 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 --- archival/rpm2cpio.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'archival/rpm2cpio.c') 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"); -- cgit v1.2.3