diff options
Diffstat (limited to '')
-rw-r--r-- | archival/rpm.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/archival/rpm.c b/archival/rpm.c index d83c33137..c2f0550ff 100644 --- a/archival/rpm.c +++ b/archival/rpm.c | |||
@@ -330,7 +330,7 @@ static void extract_cpio(int fd, const char *source_rpm) | |||
330 | archive_handle->src_fd = fd; | 330 | archive_handle->src_fd = fd; |
331 | /*archive_handle->offset = 0; - init_handle() did it */ | 331 | /*archive_handle->offset = 0; - init_handle() did it */ |
332 | 332 | ||
333 | setup_unzip_on_fd(archive_handle->src_fd, /*fail_if_not_compressed:*/ 1); | 333 | setup_unzip_on_fd(archive_handle->src_fd, /*die_if_not_compressed:*/ 1); |
334 | while (get_header_cpio(archive_handle) == EXIT_SUCCESS) | 334 | while (get_header_cpio(archive_handle) == EXIT_SUCCESS) |
335 | continue; | 335 | continue; |
336 | } | 336 | } |
@@ -549,6 +549,7 @@ int rpm2cpio_main(int argc UNUSED_PARAM, char **argv) | |||
549 | // /* We need to know whether child (gzip/bzip/etc) exits abnormally */ | 549 | // /* We need to know whether child (gzip/bzip/etc) exits abnormally */ |
550 | // signal(SIGCHLD, check_errors_in_children); | 550 | // signal(SIGCHLD, check_errors_in_children); |
551 | 551 | ||
552 | str = NULL; | ||
552 | if (ENABLE_FEATURE_SEAMLESS_LZMA | 553 | if (ENABLE_FEATURE_SEAMLESS_LZMA |
553 | && (str = rpm_getstr0(TAG_PAYLOADCOMPRESSOR)) != NULL | 554 | && (str = rpm_getstr0(TAG_PAYLOADCOMPRESSOR)) != NULL |
554 | && strcmp(str, "lzma") == 0 | 555 | && strcmp(str, "lzma") == 0 |
@@ -557,7 +558,11 @@ int rpm2cpio_main(int argc UNUSED_PARAM, char **argv) | |||
557 | // set up decompressor without detection | 558 | // set up decompressor without detection |
558 | setup_lzma_on_fd(rpm_fd); | 559 | setup_lzma_on_fd(rpm_fd); |
559 | } else { | 560 | } else { |
560 | setup_unzip_on_fd(rpm_fd, /*fail_if_not_compressed:*/ 1); | 561 | int signature_bytes = setup_unzip_on_fd(rpm_fd, /*die_if_not_compressed:*/ 0); |
562 | if (signature_bytes != 0) { | ||
563 | xlseek(rpm_fd, - signature_bytes, SEEK_CUR); | ||
564 | bb_error_msg("warning, unknown compression '%s'", str); | ||
565 | } | ||
561 | } | 566 | } |
562 | 567 | ||
563 | if (bb_copyfd_eof(rpm_fd, STDOUT_FILENO) < 0) | 568 | if (bb_copyfd_eof(rpm_fd, STDOUT_FILENO) < 0) |