Rename a few symbols for clarity.
xbps_check_is_installed_pkg -> xbps_check_is_installed_pkg_by_pattern xbps_check_is_installed_pkgname -> xbps_check_is_installed_pkg_by_name xbps_check_is_repo_string_remote -> xbps_check_is_remote_uri_remote
This commit is contained in:
parent
628a6cebf7
commit
26701d3bf3
@ -252,7 +252,8 @@ xbps_check_pkg_integrity(const char *pkgname)
|
||||
rv = EINVAL;
|
||||
goto out;
|
||||
}
|
||||
if (xbps_check_is_installed_pkg(reqpkg) <= 0) {
|
||||
rv = xbps_check_is_installed_pkg_by_pattern(reqpkg);
|
||||
if (rv <= 0) {
|
||||
rv = ENOENT;
|
||||
printf("%s: dependency not satisfied: %s\n",
|
||||
pkgname, reqpkg);
|
||||
|
@ -173,7 +173,7 @@ register_repository(const char *uri)
|
||||
if ((idxstr = sanitize_url(uri)) == NULL)
|
||||
return errno;
|
||||
|
||||
if (xbps_check_is_repo_string_remote(idxstr)) {
|
||||
if (xbps_check_is_repository_uri_remote(idxstr)) {
|
||||
printf("Fetching remote package index at %s...\n", idxstr);
|
||||
rv = xbps_repository_sync_pkg_index(idxstr,
|
||||
fetch_file_progress_cb, &xfpd);
|
||||
@ -306,7 +306,7 @@ repo_sync_pkg_index_cb(struct repository_pool_index *rpi, void *arg, bool *done)
|
||||
(void)arg;
|
||||
(void)done;
|
||||
|
||||
if (!xbps_check_is_repo_string_remote(rpi->rpi_uri))
|
||||
if (!xbps_check_is_repository_uri_remote(rpi->rpi_uri))
|
||||
return 0;
|
||||
|
||||
printf("Syncing package index from: %s\n", rpi->rpi_uri);
|
||||
|
@ -1106,7 +1106,7 @@ int xbps_check_file_hash(const char *file, const char *sha256);
|
||||
* didn't match installed package, 1 if \a pkg pattern fully
|
||||
* matched installed package.
|
||||
*/
|
||||
int xbps_check_is_installed_pkg(const char *pkg);
|
||||
int xbps_check_is_installed_pkg_by_pattern(const char *pkg);
|
||||
|
||||
/**
|
||||
* Checks if package \a pkgname is currently installed.
|
||||
@ -1115,7 +1115,7 @@ int xbps_check_is_installed_pkg(const char *pkg);
|
||||
*
|
||||
* @return True if \a pkgname is installed, false otherwise.
|
||||
*/
|
||||
bool xbps_check_is_installed_pkgname(const char *pkgname);
|
||||
bool xbps_check_is_installed_pkg_by_name(const char *pkgname);
|
||||
|
||||
/**
|
||||
* Checks if the URI specified by \a uri is remote or local.
|
||||
@ -1124,7 +1124,7 @@ bool xbps_check_is_installed_pkgname(const char *pkgname);
|
||||
*
|
||||
* @return true if URI is remote, false if local.
|
||||
*/
|
||||
bool xbps_check_is_repo_string_remote(const char *uri);
|
||||
bool xbps_check_is_repository_uri_remote(const char *uri);
|
||||
|
||||
/**
|
||||
* Gets the full URI to a binary package file as returned by a
|
||||
|
@ -181,7 +181,7 @@ xbps_remove_pkg(const char *pkgname, const char *version, bool update)
|
||||
/*
|
||||
* Check if pkg is installed before anything else.
|
||||
*/
|
||||
if (!xbps_check_is_installed_pkgname(pkgname))
|
||||
if (!xbps_check_is_installed_pkg_by_name(pkgname))
|
||||
return ENOENT;
|
||||
|
||||
buf = xbps_xasprintf(".%s/metadata/%s/REMOVE",
|
||||
|
@ -119,7 +119,7 @@ open_archive(const char *url)
|
||||
struct url *u;
|
||||
struct archive *a;
|
||||
|
||||
if (!xbps_check_is_repo_string_remote(url)) {
|
||||
if (!xbps_check_is_repository_uri_remote(url)) {
|
||||
if ((a = archive_read_new()) == NULL)
|
||||
return NULL;
|
||||
|
||||
|
@ -162,7 +162,7 @@ xbps_repository_unregister(const char *uri)
|
||||
* If it's a remote repository, also remove the stored XBPS_PKGINDEX
|
||||
* file and its directory.
|
||||
*/
|
||||
if (xbps_check_is_repo_string_remote(uri)) {
|
||||
if (xbps_check_is_repository_uri_remote(uri)) {
|
||||
pkgindex = xbps_get_pkg_index_plist(uri);
|
||||
if (pkgindex == NULL) {
|
||||
rv = errno;
|
||||
|
@ -158,7 +158,7 @@ again:
|
||||
* If dependency is already satisfied or queued,
|
||||
* pass to the next one.
|
||||
*/
|
||||
if (xbps_check_is_installed_pkg(str)) {
|
||||
if (xbps_check_is_installed_pkg_by_pattern(str)) {
|
||||
rundepscnt++;
|
||||
xbps_dbg_printf_append("installed.\n");
|
||||
} else if (xbps_find_pkg_in_dict_by_name(transd,
|
||||
|
@ -150,7 +150,7 @@ xbps_check_file_hash(const char *file, const char *sha256)
|
||||
}
|
||||
|
||||
bool
|
||||
xbps_check_is_repo_string_remote(const char *uri)
|
||||
xbps_check_is_repository_uri_remote(const char *uri)
|
||||
{
|
||||
assert(uri != NULL);
|
||||
|
||||
@ -163,7 +163,7 @@ xbps_check_is_repo_string_remote(const char *uri)
|
||||
}
|
||||
|
||||
int
|
||||
xbps_check_is_installed_pkg(const char *pattern)
|
||||
xbps_check_is_installed_pkg_by_pattern(const char *pattern)
|
||||
{
|
||||
prop_dictionary_t dict;
|
||||
pkg_state_t state;
|
||||
@ -196,7 +196,7 @@ xbps_check_is_installed_pkg(const char *pattern)
|
||||
}
|
||||
|
||||
bool
|
||||
xbps_check_is_installed_pkgname(const char *pkgname)
|
||||
xbps_check_is_installed_pkg_by_name(const char *pkgname)
|
||||
{
|
||||
prop_dictionary_t pkgd;
|
||||
|
||||
@ -347,7 +347,7 @@ xbps_get_pkg_index_plist(const char *uri)
|
||||
if (uname(&un) == -1)
|
||||
return NULL;
|
||||
|
||||
if (xbps_check_is_repo_string_remote(uri))
|
||||
if (xbps_check_is_repository_uri_remote(uri))
|
||||
return get_pkg_index_remote_plist(uri);
|
||||
|
||||
return xbps_xasprintf("%s/%s/%s", uri, un.machine, XBPS_PKGINDEX);
|
||||
|
Loading…
x
Reference in New Issue
Block a user