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:
authorNathan Jones <nathanj@insightbb.com>2007-10-19 13:17:51 -0400
committerDan McGee <dan@archlinux.org>2007-10-19 19:21:44 -0500
commit0c2cc108d332837de4a33ca9cabe717bd414c407 (patch)
tree78e7901eedf2bf0c0d27ea3d77dff8ac9580875d /lib/libalpm/package.c
parent1118e00fe91125e464e8c3487f58f6000e0036b2 (diff)
Add pmdelta_t structure and functions to libalpm.
Signed-off-by: Nathan Jones <nathanj@insightbb.com> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/package.c')
-rw-r--r--lib/libalpm/package.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c
index 9e45b1d5..4f6f5a9e 100644
--- a/lib/libalpm/package.c
+++ b/lib/libalpm/package.c
@@ -446,6 +446,20 @@ alpm_list_t SYMEXPORT *alpm_pkg_get_provides(pmpkg_t *pkg)
return pkg->provides;
}
+alpm_list_t SYMEXPORT *alpm_pkg_get_deltas(pmpkg_t *pkg)
+{
+ ALPM_LOG_FUNC;
+
+ /* Sanity checks */
+ ASSERT(handle != NULL, return(NULL));
+ ASSERT(pkg != NULL, return(NULL));
+
+ if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DELTAS)) {
+ _alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DELTAS);
+ }
+ return pkg->deltas;
+}
+
alpm_list_t SYMEXPORT *alpm_pkg_get_replaces(pmpkg_t *pkg)
{
ALPM_LOG_FUNC;
@@ -722,6 +736,7 @@ void _alpm_pkg_free(pmpkg_t *pkg)
FREELIST(pkg->groups);
FREELIST(pkg->provides);
FREELIST(pkg->replaces);
+ FREELIST(pkg->deltas);
if(pkg->origin == PKG_FROM_FILE) {
FREE(pkg->origin_data.file);
}