Rename some function from lib/repository* with more meaningful names.

xbps_unregister_repository() -> xbps_repository_register()
xbps_register_repository() -> xbps_repository_unregister()
xbps_find_deps_in_pkg() -> xbps_repository_find_pkg_deps()
xbps_prepare_pkg() -> xbps_repository_install_pkg()
xbps_find_new_pkg() -> xbps_repository_update_pkg()
xbps_find_new_packages() -> xbps_repository_update_allpkgs()
xbps_get_pkg_props() -> xbps_repository_get_transaction_dict()

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091130110846-5uaqxdhfo0kl0cqd
This commit is contained in:
Juan RP
2009-11-30 12:08:46 +01:00
parent e4cda0e9cc
commit 91aeac4dad
6 changed files with 46 additions and 44 deletions

View File

@@ -312,7 +312,7 @@ xbps_exec_transaction(const char *pkgname, bool force, bool update)
* "xbps-bin autoupdate".
*/
printf("Finding new packages...\n");
if ((rv = xbps_find_new_packages()) != 0) {
if ((rv = xbps_repository_update_allpkgs()) != 0) {
if (rv == ENOENT) {
printf("No packages currently registered.\n");
return 0;
@@ -331,7 +331,7 @@ xbps_exec_transaction(const char *pkgname, bool force, bool update)
*/
printf("Finding new '%s' package...\n", pkgname);
if (pkgd) {
rv = xbps_find_new_pkg(pkgname, pkgd);
rv = xbps_repository_update_pkg(pkgname, pkgd);
if (rv == EEXIST) {
printf("Package '%s' is up to date.\n",
pkgname);
@@ -363,7 +363,7 @@ xbps_exec_transaction(const char *pkgname, bool force, bool update)
prop_object_release(pkgd);
return rv;
}
rv = xbps_prepare_pkg(pkgname);
rv = xbps_repository_install_pkg(pkgname);
if (rv != 0 && rv == EAGAIN) {
printf("Unable to locate '%s' in "
"repository pool.\n", pkgname);
@@ -379,7 +379,7 @@ xbps_exec_transaction(const char *pkgname, bool force, bool update)
if (trans == NULL)
goto out;
trans->dict = xbps_get_pkg_props();
trans->dict = xbps_repository_get_transaction_dict();
if (trans->dict == NULL) {
printf("error: unexistent props dictionary!\n");
goto out1;

View File

@@ -134,7 +134,7 @@ unregister_repository(const char *uri)
if (!sanitize_url(idxstr, uri))
return errno;
if ((rv = xbps_unregister_repository(idxstr)) != 0) {
if ((rv = xbps_repository_unregister(idxstr)) != 0) {
if (rv == ENOENT)
printf("Repository '%s' not actually "
"registered.\n", idxstr);
@@ -182,7 +182,7 @@ register_repository(const char *uri)
if ((rv = pkgindex_verify(plist, idxstr, false)) != 0)
goto out;
if ((rv = xbps_register_repository(idxstr)) != 0) {
if ((rv = xbps_repository_register(idxstr)) != 0) {
printf("ERROR: couldn't register repository (%s)\n",
strerror(rv));
goto out;