index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | lib/libalpm/alpm.h | 38 |
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 96b63ca6..25eb88c5 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -45,14 +45,12 @@ typedef struct __pmdb_t pmdb_t; typedef struct __pmpkg_t pmpkg_t; typedef struct __pmdelta_t pmdelta_t; typedef struct __pmgrp_t pmgrp_t; -typedef struct __pmserver_t pmserver_t; typedef struct __pmtrans_t pmtrans_t; typedef struct __pmsyncpkg_t pmsyncpkg_t; typedef struct __pmdepend_t pmdepend_t; typedef struct __pmdepmissing_t pmdepmissing_t; typedef struct __pmconflict_t pmconflict_t; typedef struct __pmfileconflict_t pmfileconflict_t; -typedef struct __pmgraph_t pmgraph_t; /* * Library @@ -81,8 +79,7 @@ int alpm_logaction(char *fmt, ...); * Downloading */ -typedef void (*alpm_cb_download)(const char *filename, int file_xfered, - int file_total, int list_xfered, int list_total); +typedef void (*alpm_cb_download)(const char *filename, int xfered, int total); /* * Options @@ -241,22 +238,15 @@ const char *alpm_delta_get_md5sum(pmdelta_t *delta); * Groups */ const char *alpm_grp_get_name(const pmgrp_t *grp); -const alpm_list_t *alpm_grp_get_pkgs(const pmgrp_t *grp); +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); 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); +pmpkg_t *alpm_sync_newversion(pmpkg_t *pkg, alpm_list_t *dbs_sync); int alpm_sync_sysupgrade(pmdb_t *db_local, alpm_list_t *dbs_sync, alpm_list_t **syncpkgs); @@ -266,10 +256,9 @@ int alpm_sync_sysupgrade(pmdb_t *db_local, /* Types */ typedef enum _pmtranstype_t { - PM_TRANS_TYPE_ADD = 1, + PM_TRANS_TYPE_UPGRADE = 1, PM_TRANS_TYPE_REMOVE, PM_TRANS_TYPE_REMOVEUPGRADE, - PM_TRANS_TYPE_UPGRADE, PM_TRANS_TYPE_SYNC } pmtranstype_t; @@ -282,13 +271,16 @@ typedef enum _pmtransflag_t { PM_TRANS_FLAG_CASCADE = 0x10, PM_TRANS_FLAG_RECURSE = 0x20, PM_TRANS_FLAG_DBONLY = 0x40, - PM_TRANS_FLAG_DEPENDSONLY = 0x80, + /* 0x80 flag can go here */ PM_TRANS_FLAG_ALLDEPS = 0x100, PM_TRANS_FLAG_DOWNLOADONLY = 0x200, PM_TRANS_FLAG_NOSCRIPTLET = 0x400, PM_TRANS_FLAG_NOCONFLICTS = 0x800, PM_TRANS_FLAG_PRINTURIS = 0x1000, - PM_TRANS_FLAG_NEEDED = 0x2000 + PM_TRANS_FLAG_NEEDED = 0x2000, + PM_TRANS_FLAG_ALLEXPLICIT = 0x4000, + PM_TRANS_FLAG_UNNEEDED = 0x8000, + PM_TRANS_FLAG_RECURSEALL = 0x10000 } pmtransflag_t; /* Transaction Events */ @@ -353,7 +345,6 @@ typedef void (*alpm_trans_cb_progress)(pmtransprog_t, const char *, int, int, in pmtranstype_t alpm_trans_get_type(); unsigned int alpm_trans_get_flags(); -alpm_list_t * alpm_trans_get_targets(); alpm_list_t * alpm_trans_get_pkgs(); int alpm_trans_init(pmtranstype_t type, pmtransflag_t flags, alpm_trans_cb_event cb_event, alpm_trans_cb_conv conv, @@ -378,13 +369,16 @@ typedef enum _pmdepmod_t { PM_DEP_MOD_LT } pmdepmod_t; -pmdepend_t *alpm_splitdep(const char *depstring); int alpm_depcmp(pmpkg_t *pkg, pmdepend_t *dep); alpm_list_t *alpm_checkdeps(pmdb_t *db, int reversedeps, alpm_list_t *remove, alpm_list_t *upgrade); +alpm_list_t *alpm_deptest(pmdb_t *db, alpm_list_t *targets); const char *alpm_miss_get_target(const pmdepmissing_t *miss); pmdepend_t *alpm_miss_get_dep(pmdepmissing_t *miss); +const char *alpm_miss_get_causingpkg(const pmdepmissing_t *miss); + +alpm_list_t *alpm_checkdbconflicts(pmdb_t *db_local); const char *alpm_conflict_get_package1(pmconflict_t *conflict); const char *alpm_conflict_get_package2(pmconflict_t *conflict); @@ -460,14 +454,12 @@ enum _pmerrno_t { PM_ERR_PKG_INVALID, PM_ERR_PKG_OPEN, PM_ERR_PKG_LOAD, - PM_ERR_PKG_INSTALLED, PM_ERR_PKG_CANT_FRESH, PM_ERR_PKG_CANT_REMOVE, PM_ERR_PKG_INVALID_NAME, - PM_ERR_PKG_CORRUPTED, PM_ERR_PKG_REPO_NOT_FOUND, /* Deltas */ - PM_ERR_DLT_CORRUPTED, + PM_ERR_DLT_INVALID, PM_ERR_DLT_PATCHFAILED, /* Groups */ PM_ERR_GRP_NOT_FOUND, |