Only add support for bzip2/lzma compression and tar format in

libarchive.

--HG--
extra : convert_revision : d8153785d25241d8e22ef664d484cf37a50c8ef2
This commit is contained in:
Juan RP 2009-04-18 17:25:04 +02:00
parent d11cce17d8
commit e4c31936b2
2 changed files with 8 additions and 6 deletions

View File

@ -94,9 +94,10 @@ repoidx_addpkg(const char *file, const char *filename, const char *pkgdir)
if (ar == NULL) if (ar == NULL)
return errno; return errno;
/* Enable support for all format and compression methods */ /* Enable support for tar format archives with bzip2/lzma compression */
archive_read_support_compression_all(ar); archive_read_support_compression_bzip2(ar);
archive_read_support_format_all(ar); archive_read_support_compression_lzma(ar);
archive_read_support_format_tar(ar);
if ((rv = archive_read_open_filename(ar, file, if ((rv = archive_read_open_filename(ar, file,
ARCHIVE_READ_BLOCKSIZE)) == -1) { ARCHIVE_READ_BLOCKSIZE)) == -1) {

View File

@ -87,9 +87,10 @@ unpack_archive_init(prop_dictionary_t pkg, const char *binfile)
return ENOMEM; return ENOMEM;
} }
/* Enable support for all format and compression methods */ /* Enable support for tar archives with bzip2/lzma compression */
archive_read_support_compression_all(ar); archive_read_support_compression_bzip2(ar);
archive_read_support_format_all(ar); archive_read_support_compression_lzma(ar);
archive_read_support_format_tar(ar);
/* 2048 is arbitrary... dunno what value is better. */ /* 2048 is arbitrary... dunno what value is better. */
if ((rv = archive_read_open_fd(ar, pkg_fd, if ((rv = archive_read_open_fd(ar, pkg_fd,