summaryrefslogtreecommitdiff
path: root/archival/dpkg.c
diff options
context:
space:
mode:
authorDenys Vlasenko2015-01-30 15:15:38 +0100
committerDenys Vlasenko2015-01-30 15:15:38 +0100
commit08f9ffc3f7503eb3dc94f16c615b20d2ae9a059c (patch)
tree7f4ad348cc275500a72a6c7ea3dab015bce2221b /archival/dpkg.c
parent8c05a74f7efcda6ae5bd83e134edf44af12cb5e4 (diff)
downloadbusybox-08f9ffc3f7503eb3dc94f16c615b20d2ae9a059c.zip
busybox-08f9ffc3f7503eb3dc94f16c615b20d2ae9a059c.tar.gz
dpkg: update supported compression methods
Based on a patch by Ron Yorston <rmy@tigress.co.uk> function old new delta get_header_tar_xz - 60 +60 filter_accept_list_reassign 128 188 +60 unpack_package 585 621 +36 init_archive_deb_control 52 76 +24 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 3/0 up/down: 180/0) Total: 180 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'archival/dpkg.c')
-rw-r--r--archival/dpkg.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/archival/dpkg.c b/archival/dpkg.c
index 2893cfc..151f0ca 100644
--- a/archival/dpkg.c
+++ b/archival/dpkg.c
@@ -1472,12 +1472,16 @@ static void init_archive_deb_control(archive_handle_t *ar_handle)
tar_handle->src_fd = ar_handle->src_fd;
/* We don't care about data.tar.* or debian-binary, just control.tar.* */
+ llist_add_to(&(ar_handle->accept), (char*)"control.tar");
#if ENABLE_FEATURE_SEAMLESS_GZ
llist_add_to(&(ar_handle->accept), (char*)"control.tar.gz");
#endif
#if ENABLE_FEATURE_SEAMLESS_BZ2
llist_add_to(&(ar_handle->accept), (char*)"control.tar.bz2");
#endif
+#if ENABLE_FEATURE_SEAMLESS_XZ
+ llist_add_to(&(ar_handle->accept), (char*)"control.tar.xz");
+#endif
/* Assign the tar handle as a subarchive of the ar handle */
ar_handle->dpkg__sub_archive = tar_handle;
@@ -1492,12 +1496,19 @@ static void init_archive_deb_data(archive_handle_t *ar_handle)
tar_handle->src_fd = ar_handle->src_fd;
/* We don't care about control.tar.* or debian-binary, just data.tar.* */
+ llist_add_to(&(ar_handle->accept), (char*)"data.tar");
#if ENABLE_FEATURE_SEAMLESS_GZ
llist_add_to(&(ar_handle->accept), (char*)"data.tar.gz");
#endif
#if ENABLE_FEATURE_SEAMLESS_BZ2
llist_add_to(&(ar_handle->accept), (char*)"data.tar.bz2");
#endif
+#if ENABLE_FEATURE_SEAMLESS_LZMA
+ llist_add_to(&(ar_handle->accept), (char*)"data.tar.lzma");
+#endif
+#if ENABLE_FEATURE_SEAMLESS_XZ
+ llist_add_to(&(ar_handle->accept), (char*)"data.tar.xz");
+#endif
/* Assign the tar handle as a subarchive of the ar handle */
ar_handle->dpkg__sub_archive = tar_handle;