libxbps: added support for multiple compression formats in repodata.
Also don't use obsolete libarchive interfaces.
This commit is contained in:
parent
ab9a587d34
commit
7f75910054
@ -590,11 +590,13 @@ xbps_unpack_binary_pkg(struct xbps_handle *xhp, xbps_dictionary_t pkg_repod)
|
|||||||
return ENOMEM;
|
return ENOMEM;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* Enable support for tar format and gzip/bzip2/lzma compression methods.
|
* Enable support for tar format and some compression methods.
|
||||||
*/
|
*/
|
||||||
archive_read_support_compression_gzip(ar);
|
archive_read_support_filter_gzip(ar);
|
||||||
archive_read_support_compression_bzip2(ar);
|
archive_read_support_filter_bzip2(ar);
|
||||||
archive_read_support_compression_xz(ar);
|
archive_read_support_filter_xz(ar);
|
||||||
|
archive_read_support_filter_lz4(ar);
|
||||||
|
archive_read_support_filter_zstd(ar);
|
||||||
archive_read_support_format_tar(ar);
|
archive_read_support_format_tar(ar);
|
||||||
|
|
||||||
myumask = umask(022);
|
myumask = umask(022);
|
||||||
|
@ -95,9 +95,11 @@ open_archive_by_url(struct url *url)
|
|||||||
free(f);
|
free(f);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
archive_read_support_compression_gzip(a);
|
archive_read_support_filter_gzip(a);
|
||||||
archive_read_support_compression_bzip2(a);
|
archive_read_support_filter_bzip2(a);
|
||||||
archive_read_support_compression_xz(a);
|
archive_read_support_filter_xz(a);
|
||||||
|
archive_read_support_filter_lz4(a);
|
||||||
|
archive_read_support_filter_zstd(a);
|
||||||
archive_read_support_format_tar(a);
|
archive_read_support_format_tar(a);
|
||||||
|
|
||||||
if (archive_read_open(a, f, fetch_archive_open, fetch_archive_read,
|
if (archive_read_open(a, f, fetch_archive_open, fetch_archive_read,
|
||||||
@ -119,9 +121,11 @@ open_archive(const char *url)
|
|||||||
if ((a = archive_read_new()) == NULL)
|
if ((a = archive_read_new()) == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
archive_read_support_compression_gzip(a);
|
archive_read_support_filter_gzip(a);
|
||||||
archive_read_support_compression_bzip2(a);
|
archive_read_support_filter_bzip2(a);
|
||||||
archive_read_support_compression_xz(a);
|
archive_read_support_filter_xz(a);
|
||||||
|
archive_read_support_filter_lz4(a);
|
||||||
|
archive_read_support_filter_zstd(a);
|
||||||
archive_read_support_format_tar(a);
|
archive_read_support_format_tar(a);
|
||||||
|
|
||||||
if (archive_read_open_filename(a, url, 32768)) {
|
if (archive_read_open_filename(a, url, 32768)) {
|
||||||
|
@ -144,7 +144,11 @@ repo_open_local(struct xbps_repo *repo, const char *repofile)
|
|||||||
}
|
}
|
||||||
|
|
||||||
repo->ar = archive_read_new();
|
repo->ar = archive_read_new();
|
||||||
archive_read_support_compression_gzip(repo->ar);
|
archive_read_support_filter_gzip(repo->ar);
|
||||||
|
archive_read_support_filter_bzip2(repo->ar);
|
||||||
|
archive_read_support_filter_xz(repo->ar);
|
||||||
|
archive_read_support_filter_lz4(repo->ar);
|
||||||
|
archive_read_support_filter_zstd(repo->ar);
|
||||||
archive_read_support_format_tar(repo->ar);
|
archive_read_support_format_tar(repo->ar);
|
||||||
|
|
||||||
if (archive_read_open_fd(repo->ar, repo->fd, st.st_blksize) == ARCHIVE_FATAL) {
|
if (archive_read_open_fd(repo->ar, repo->fd, st.st_blksize) == ARCHIVE_FATAL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user