xbps-repo: changed the 'sync' target to update from all registered
remote repositories, so remove its argument. xbps_sync_repository_pkg_index: - create the local repo dir in XBPS_META_PATH. - also add the uri scheme (http://, https://, ftp://) in the created local directory and subst ':' also with an underscore. - do not create local repo directories unless the download pkg-index plist file is verified to be fetched correctly. xbps_check_is_repo_string_remote: New function to check if a repo string is a remote repository, use it in all places where it was used before. --HG-- extra : convert_revision : xtraeme%40gmail.com-20091123042316-rmu4w3ehoxwh3iz8
This commit is contained in:
15
lib/util.c
15
lib/util.c
@ -111,6 +111,19 @@ xbps_check_pkg_file_hash(prop_dictionary_t pkgd, const char *repoloc)
|
||||
return rv;
|
||||
}
|
||||
|
||||
bool SYMEXPORT
|
||||
xbps_check_is_repo_string_remote(const char *uri)
|
||||
{
|
||||
assert(uri != NULL);
|
||||
|
||||
if ((strncmp(uri, "https://", 8) == 0) ||
|
||||
(strncmp(uri, "http://", 7) == 0) ||
|
||||
(strncmp(uri, "ftp://", 6) == 0))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
int SYMEXPORT
|
||||
xbps_check_is_installed_pkg(const char *pkg)
|
||||
{
|
||||
@ -289,7 +302,7 @@ get_pkg_index_remote_plist(const char *uri, const char *machine)
|
||||
if (uri_fixed == NULL)
|
||||
return NULL;
|
||||
|
||||
repodir = xbps_xasprintf("%s/%s/repo/%s/%s/%s",
|
||||
repodir = xbps_xasprintf("%s/%s/%s/%s/%s",
|
||||
xbps_get_rootdir(), XBPS_META_PATH, uri_fixed,
|
||||
machine, XBPS_PKGINDEX);
|
||||
if (repodir == NULL) {
|
||||
|
Reference in New Issue
Block a user