aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2013-05-16 12:52:45 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2013-05-16 12:52:45 +0100
commit9dcd799fd4d4ffb5c5f4e2649d612939641ee1ce (patch)
tree13b6ed8550dfe2675ab230a23bbac4cb689252bc
parent4e55e28e052f8a218e27edd3e3689d1d3cf5ba76 (diff)
downloadpaludis-9dcd799fd4d4ffb5c5f4e2649d612939641ee1ce.tar.gz
paludis-9dcd799fd4d4ffb5c5f4e2649d612939641ee1ce.tar.xz
Update to new libarchive
-rw-r--r--paludis/repositories/e/ebuild/utils/unpaxinate.cc4
-rw-r--r--paludis/tar_extras.cc12
2 files changed, 8 insertions, 8 deletions
diff --git a/paludis/repositories/e/ebuild/utils/unpaxinate.cc b/paludis/repositories/e/ebuild/utils/unpaxinate.cc
index fb45618..9aee832 100644
--- a/paludis/repositories/e/ebuild/utils/unpaxinate.cc
+++ b/paludis/repositories/e/ebuild/utils/unpaxinate.cc
@@ -29,7 +29,7 @@ int main(int argc, char *argv[])
return EXIT_FAILURE;
archive * archive(archive_read_new());
- archive_read_support_compression_all(archive);
+ archive_read_support_filter_all(archive);
archive_read_support_format_all(archive);
int x;
@@ -79,7 +79,7 @@ int main(int argc, char *argv[])
done_any = true;
}
- if (ARCHIVE_OK != ((x = archive_read_finish(archive))))
+ if (ARCHIVE_OK != ((x = archive_read_free(archive))))
{
std::cerr << "Could not finish reading '" << archive_file << "': libarchive returned " <<
x << ", archive_errno " << archive_errno(archive) << ": " << archive_error_string(archive) << std::endl;
diff --git a/paludis/tar_extras.cc b/paludis/tar_extras.cc
index 239504a..5917ac9 100644
--- a/paludis/tar_extras.cc
+++ b/paludis/tar_extras.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2010, 2011 Ciaran McCreesh
+ * Copyright (c) 2010, 2011, 2012 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -46,9 +46,9 @@ paludis_tar_extras_init(const std::string & f, const std::string & compress)
throw MergerError("archive_write_new returned null");
if (compress == "bz2")
- archive_write_set_compression_bzip2(extras->archive);
+ archive_write_add_filter_bzip2(extras->archive);
else
- archive_write_set_compression_none(extras->archive);
+ archive_write_add_filter_none(extras->archive);
archive_write_set_format_gnutar(extras->archive);
@@ -102,7 +102,7 @@ paludis_tar_extras_add_file(PaludisTarExtras * const extras, const std::string &
if (ARCHIVE_OK != archive_write_finish_entry(extras->archive))
throw MergerError("archive_write_finish_entry failed");
- if (ARCHIVE_OK != archive_read_finish(disk_archive))
+ if (ARCHIVE_OK != archive_read_free(disk_archive))
throw MergerError("archive_read_finish failed");
}
else
@@ -142,8 +142,8 @@ paludis_tar_extras_cleanup(PaludisTarExtras * const extras)
{
if (ARCHIVE_OK != archive_write_close(extras->archive))
throw MergerError("archive_write_close failed");
- if (ARCHIVE_OK != archive_write_finish(extras->archive))
- throw MergerError("archive_write_finish failed");
+ if (ARCHIVE_OK != archive_write_free(extras->archive))
+ throw MergerError("archive_write_free failed");
archive_entry_linkresolver_free(extras->linkresolver);
delete extras;
}