summaryrefslogtreecommitdiff
path: root/lib/libalpm/add.c
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2013-01-28 20:23:25 -0500
committerAllan McRae <allan@archlinux.org>2013-01-29 13:37:32 +1000
commite1e4bbb79ddd23e46b8d3a01168f4eb410308d5b (patch)
treeaf5e7d24e30a953b3e1e46a76e0b90804a12ebe6 /lib/libalpm/add.c
parent2a57c2068c3ea744608c364f9cacedd3f0c14849 (diff)
downloadpacman-e1e4bbb79ddd23e46b8d3a01168f4eb410308d5b.tar.xz
Use libarchive compat header for relevant symbols
Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
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 */