libxbps: add xbps_repository_pool_sync, to sync repoidx from all remotes.

This commit is contained in:
Juan RP
2011-11-10 23:14:50 +01:00
parent de4504c248
commit c2eed68471
6 changed files with 61 additions and 77 deletions

View File

@ -55,7 +55,7 @@
*/
#define XBPS_PKGINDEX_VERSION "1.3"
#define XBPS_API_VERSION "20111109"
#define XBPS_API_VERSION "20111110"
#define XBPS_VERSION "0.11.0"
/**
@ -183,8 +183,8 @@ void xbps_warn_printf(const char *, ...);
*
* <b>XBPS_TRANS_STATE_REGISTER</b>: a package is being registered.
*
* <b>XBPS_TRANS_STATE_REPOSYNC</b>. a remote repository's
* pkg index is being synced.
* <b>XBPS_TRANS_STATE_REPOSYNC</b>: a remote repository's
* pkg index is being synchronized.
*/
typedef enum trans_state {
XBPS_TRANS_STATE_UNKNOWN = 0,
@ -1249,6 +1249,15 @@ struct repository_pool_index {
char *rpi_uri;
};
/**
* Synchronizes the package index file for all remote repositories
* as specified in the configuration file, repositories.plist.
*
* @return 0 on success, ENOTSUP if no repositories were found in
* the configuration file.
*/
int xbps_repository_pool_sync(void);
/**
* Iterates over the repository pool and executes the \a fn function
* callback passing in the void * \a arg argument to it. The bool pointer