Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/package.c
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2012-05-02 11:08:07 +1000
committerAllan McRae <allan@archlinux.org>2012-12-14 13:45:12 +1000
commit097d5a478b32aece93013580fdb06cacbaf0e9a0 (patch)
tree678c0d254672c7b0c7e17bc6270d37910ea16638 /lib/libalpm/package.c
parent0445c68d9b7738553dd1a5088110b8b0a1e1f7f9 (diff)
Add public functions for accessing mtree data
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm/package.c')
-rw-r--r--lib/libalpm/package.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c
index 0909ba9b..d77471fd 100644
--- a/lib/libalpm/package.c
+++ b/lib/libalpm/package.c
@@ -403,6 +403,31 @@ int SYMEXPORT alpm_pkg_changelog_close(const alpm_pkg_t *pkg, void *fp)
return pkg->ops->changelog_close(pkg, fp);
}
+/** Open a package mtree file for reading. */
+struct archive SYMEXPORT *alpm_pkg_mtree_open(alpm_pkg_t * pkg)
+{
+ ASSERT(pkg != NULL, return NULL);
+ pkg->handle->pm_errno = 0;
+ return pkg->ops->mtree_open(pkg);
+}
+
+/** Read entry from an open mtree file. */
+int SYMEXPORT alpm_pkg_mtree_next(const alpm_pkg_t * pkg, struct archive *archive,
+ struct archive_entry **entry)
+{
+ ASSERT(pkg != NULL, return -1);
+ pkg->handle->pm_errno = 0;
+ return pkg->ops->mtree_next(pkg, archive, entry);
+}
+
+/** Close a package mtree file for reading. */
+int SYMEXPORT alpm_pkg_mtree_close(const alpm_pkg_t * pkg, struct archive *archive)
+{
+ ASSERT(pkg != NULL, return -1);
+ pkg->handle->pm_errno = 0;
+ return pkg->ops->mtree_close(pkg, archive);
+}
+
int SYMEXPORT alpm_pkg_has_scriptlet(alpm_pkg_t *pkg)
{
ASSERT(pkg != NULL, return -1);