diff options
author | Ron Yorston <rmy@pobox.com> | 2025-05-19 08:34:32 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2025-05-19 08:34:32 +0100 |
commit | 64bf69893bd99c305d13a956389f216e7d15c682 (patch) | |
tree | 7fa7d449f0633c86c1248c0bb86363dd9f46da38 /archival/rpm.c | |
parent | a807cdfa95cf4af2f84e207ed15887cc3514cb43 (diff) | |
parent | 5f07327251c93184dfcfc8d978fc35705930ec53 (diff) | |
download | busybox-w32-merge.tar.gz busybox-w32-merge.tar.bz2 busybox-w32-merge.zip |
Merge branch 'busybox' into mergemerge
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) |