[pacman-dev] [PATCH] Restore libarchive 2.8.x compatibility
From: Dan McGee <dan@archlinux.org> We still call some of these 'deprecated' methods elsewhere, so this shouldn't present a problem. When we decide 2.x support is to be dropped, we should update all of the code to not call deprecated methods. Allan: Adjusted with respect to previous patches adding libarchive compatibilty layer. Signed-off-by: Allan McRae <allan@archlinux.org> --- Dave: can you confirm this compiles without warning with libarchive 3.1? lib/libalpm/be_local.c | 2 +- src/pacman/check.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libalpm/be_local.c b/lib/libalpm/be_local.c index 564e109..49b1c74 100644 --- a/lib/libalpm/be_local.c +++ b/lib/libalpm/be_local.c @@ -239,7 +239,7 @@ static struct archive *_cache_mtree_open(alpm_pkg_t *pkg) goto error; } - archive_read_support_filter_gzip(mtree); + _alpm_archive_read_support_filter_all(mtree); archive_read_support_format_mtree(mtree); if((r = _alpm_archive_read_open_file(mtree, mtfile, ALPM_BUFFER_SIZE))) { diff --git a/src/pacman/check.c b/src/pacman/check.c index 92ce05c..d7fe2d6 100644 --- a/src/pacman/check.c +++ b/src/pacman/check.c @@ -90,7 +90,7 @@ static int check_file_permissions(const char *pkgname, const char *filepath, /* mode */ fsmode = st->st_mode & (S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO); - if(fsmode != archive_entry_perm(entry)) { + if(fsmode != (~AE_IFMT & archive_entry_mode(entry))) { errors++; if(!config->quiet) { pm_printf(ALPM_LOG_WARNING, _("%s: %s (Permissions mismatch)\n"), -- 1.8.1.1
On 29/01/13 13:26, Allan McRae wrote:
From: Dan McGee <dan@archlinux.org>
We still call some of these 'deprecated' methods elsewhere, so this shouldn't present a problem. When we decide 2.x support is to be dropped, we should update all of the code to not call deprecated methods.
Allan: Adjusted with respect to previous patches adding libarchive compatibilty layer.
Signed-off-by: Allan McRae <allan@archlinux.org> ---
Dave: can you confirm this compiles without warning with libarchive 3.1?
nvm - confirmed with this and the two previous patches, this compiles without warning/error with libarchive versions 2.8, 3.0 and 3.1. Allan
participants (1)
-
Allan McRae