Fixed issue 21 "xbps-repo find-files is awfully slow" reported by ojab.

This commit is contained in:
Juan RP
2012-01-15 14:24:44 +01:00
parent 8780e15635
commit 2186e16a5e
10 changed files with 322 additions and 90 deletions

View File

@ -56,7 +56,7 @@
*/
#define XBPS_PKGINDEX_VERSION "1.3"
#define XBPS_API_VERSION "20120105"
#define XBPS_API_VERSION "20120115"
#define XBPS_VERSION "0.12"
/**
@ -103,6 +103,12 @@
*/
#define XBPS_PKGINDEX "index.plist"
/**
* @def XBPS_PKGINDEX_FILES
* Filename for the repository package index files property list.
*/
#define XBPS_PKGINDEX_FILES "index-files.plist"
/**
* @def XBPS_SYSCONF_PATH
* Default configuration PATH to find XBPS_CONF_PLIST.
@ -1450,12 +1456,13 @@ prop_dictionary_t
* by the \a uri argument (if necessary).
*
* @param[in] uri URI to a remote repository.
* @param[in] plistf Plist file to sync.
*
* @return -1 on error (errno is set appropiately), 0 if transfer was
* not necessary (local/remote size/mtime matched) or 1 if
* downloaded successfully.
*/
int xbps_repository_sync_pkg_index(const char *uri);
int xbps_repository_sync_pkg_index(const char *uri, const char *plistf);
/*@}*/
@ -1692,6 +1699,18 @@ char *xbps_path_from_repository_uri(prop_dictionary_t pkgd, const char *repoloc)
*/
char *xbps_pkg_index_plist(const char *uri);
/**
* Returns the full path to a repository package index files plist file,
* as specified by \a uri.
*
* @param[in] uri Repository URI.
*
* @return A pointer to a malloc(3)ed string, NULL otherwise and
* errno is set appropiately. The pointer should be free(3)d when it's
* no longer needded.
*/
char *xbps_pkg_index_files_plist(const char *uri);
/**
* Gets the name of a package string. Package strings are composed
* by a @<pkgname@>/@<version@> pair and separated by the <em>minus</em>