*** BLURB HERE ***
Huáng Jùnliàng (1): libalpm: use archive_write_finish for 2.x compat lib/libalpm/add.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.16.1 |
The `archive_write_free` is a new function beginning with libarchive 3.0[1]. Since we require libarchive >= 2.8.0, we should use `archive_write_finish` for compatibility.
[1]: Note 5 from https://github.com/libarchive/libarchive/wiki/Examples#a-basic-write-example Signed-off-by: Huáng Jùnliàng <[hidden email]> --- lib/libalpm/add.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c index 0beed01c..b7f47a57 100644 --- a/lib/libalpm/add.c +++ b/lib/libalpm/add.c @@ -131,7 +131,7 @@ static int perform_extraction(alpm_handle_t *handle, struct archive *archive, ret = archive_read_extract2(archive, entry, archive_writer); - archive_write_free(archive_writer); + archive_write_finish(archive_writer); if(ret == ARCHIVE_WARN && archive_errno(archive) != ENOSPC) { /* operation succeeded but a "non-critical" error was encountered */ -- 2.16.1 |
libarchive 3.0 was released at the start of 2012 and
archive_write_free() will be removed in libarchive 4.0. Just bump minimum libarchive requirements. Thanks, Allan PS - no need to send a cover letter when only posting one patch. On 08/02/18 18:39, Huáng Jùnliàng wrote: > The `archive_write_free` is a new function beginning with libarchive 3.0[1]. Since we require libarchive >= 2.8.0, we should use `archive_write_finish` for compatibility. > > [1]: Note 5 from https://github.com/libarchive/libarchive/wiki/Examples#a-basic-write-example > > Signed-off-by: Huáng Jùnliàng <[hidden email]> > --- > lib/libalpm/add.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c > index 0beed01c..b7f47a57 100644 > --- a/lib/libalpm/add.c > +++ b/lib/libalpm/add.c > @@ -131,7 +131,7 @@ static int perform_extraction(alpm_handle_t *handle, struct archive *archive, > > ret = archive_read_extract2(archive, entry, archive_writer); > > - archive_write_free(archive_writer); > + archive_write_finish(archive_writer); > > if(ret == ARCHIVE_WARN && archive_errno(archive) != ENOSPC) { > /* operation succeeded but a "non-critical" error was encountered */ > |
bump libarchive requirement to >= 3.0.0 as we use `archive_write_free` available from 3.0.0
Signed-off-by: Huáng Jùnliàng <[hidden email]> --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 86f5bb6e..e382c50a 100644 --- a/configure.ac +++ b/configure.ac @@ -216,8 +216,8 @@ AC_CHECK_LIB([m], [fabs], , AC_MSG_ERROR([libm is needed to compile pacman!])) # Check for libarchive -PKG_CHECK_MODULES(LIBARCHIVE, [libarchive >= 2.8.0], , - AC_MSG_ERROR([*** libarchive >= 2.8.0 is needed to compile pacman!])) +PKG_CHECK_MODULES(LIBARCHIVE, [libarchive >= 3.0.0], , + AC_MSG_ERROR([*** libarchive >= 3.0.0 is needed to compile pacman!])) # Check for OpenSSL have_openssl=no -- 2.16.1 |
On 09/02/18 12:11, Huáng Jùnliàng wrote:
> bump libarchive requirement to >= 3.0.0 as we use `archive_write_free` available from 3.0.0 > > Signed-off-by: Huáng Jùnliàng <[hidden email]> Applied. Thanks, A |
Free forum by Nabble | Edit this page |