From 1fc83f4af6d827bf2e69c7a10e3d2010c9211974 Mon Sep 17 00:00:00 2001 From: Nagy Gabor Date: Sun, 27 Jan 2008 12:24:50 +0100 Subject: pmsyncpkg_t cleanup Fix for sync044.py and reason001.py. Rename sync->data to sync->removes (alpm_list_t *) Replace pmsynctype_t sync->type by pmpkgreason_t sync->newreason The type field was set to UPGRADE or DEPEND or REPLACE. Instead of using type = UPGRADE or DEPEND, we now rather use a "pmpkgreason_t newreason" field directly (= explicit or depend) which allows a better handling of the install reason. And the REPLACE type is now deduced implicitly when the sync->removes list is not empty. Signed-off-by: Nagy Gabor Signed-off-by: Chantry Xavier Signed-off-by: Dan McGee --- lib/libalpm/alpm.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'lib/libalpm/alpm.h') diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 4c2793ce..027b1fee 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -246,16 +246,9 @@ const alpm_list_t *alpm_grp_get_pkgs(const pmgrp_t *grp); * Sync */ -/* Types */ -typedef enum _pmsynctype_t { - PM_SYNC_TYPE_REPLACE = 1, - PM_SYNC_TYPE_UPGRADE, - PM_SYNC_TYPE_DEPEND -} pmsynctype_t; - -pmsynctype_t alpm_sync_get_type(const pmsyncpkg_t *sync); +pmpkgreason_t alpm_sync_get_newreason(const pmsyncpkg_t *sync); pmpkg_t *alpm_sync_get_pkg(const pmsyncpkg_t *sync); -void *alpm_sync_get_data(const pmsyncpkg_t *sync); +alpm_list_t *alpm_sync_get_removes(const pmsyncpkg_t *sync); int alpm_sync_sysupgrade(pmdb_t *db_local, alpm_list_t *dbs_sync, alpm_list_t **syncpkgs); -- cgit v1.2.3-70-g09d2