summaryrefslogtreecommitdiff
path: root/lib/libalpm/add.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/add.c')
-rw-r--r--lib/libalpm/add.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index 9b678136..a8284355 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -37,6 +37,7 @@
#include "alpm.h"
#include "alpm_list.h"
#include "handle.h"
+#include "libarchive-compat.h"
#include "trans.h"
#include "util.h"
#include "log.h"
@@ -555,7 +556,7 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg,
if(chdir(handle->root) != 0) {
_alpm_log(handle, ALPM_LOG_ERROR, _("could not change directory to %s (%s)\n"),
handle->root, strerror(errno));
- archive_read_finish(archive);
+ _alpm_archive_read_free(archive);
CLOSE(fd);
ret = -1;
goto cleanup;
@@ -577,7 +578,7 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg,
/* Using compressed size for calculations here, as newpkg->isize is not
* exact when it comes to comparing to the ACTUAL uncompressed size
* (missing metadata sizes) */
- int64_t pos = archive_position_compressed(archive);
+ int64_t pos = _alpm_archive_compressed_ftell(archive);
percent = (pos * 100) / newpkg->size;
if(percent >= 100) {
percent = 100;
@@ -597,7 +598,7 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg,
/* extract the next file from the archive */
errors += extract_single_file(handle, archive, entry, newpkg, oldpkg);
}
- archive_read_finish(archive);
+ _alpm_archive_read_free(archive);
CLOSE(fd);
/* restore the old cwd if we have it */