Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/db.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-06-03 11:48:24 -0500
committerDan McGee <dan@archlinux.org>2011-06-03 11:48:24 -0500
commit78cbc045c129ca7767b13127e1e17c400b112770 (patch)
treeaf797e98350f0f1b88637349b49e5a54194b6f79 /lib/libalpm/db.c
parent9d73b261cf1bbe8db0b176aeb6a40eb9df61d1e9 (diff)
Remove ALPM_LOG_FUNC macro
The usefulness of this is rather limited due to it not being compiled into production builds. When you do choose to see the output, it is often overwhelming and not helpful. The best bet is to use a debugger and/or well-placed fprintf() statements. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/db.c')
-rw-r--r--lib/libalpm/db.c60
1 files changed, 0 insertions, 60 deletions
diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c
index 31336144..94173a26 100644
--- a/lib/libalpm/db.c
+++ b/lib/libalpm/db.c
@@ -47,8 +47,6 @@
/** Register a sync database of packages. */
pmdb_t SYMEXPORT *alpm_db_register_sync(const char *treename)
{
- ALPM_LOG_FUNC;
-
/* Sanity checks */
ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, NULL));
ASSERT(treename != NULL && strlen(treename) != 0, RET_ERR(PM_ERR_WRONG_ARGS, NULL));
@@ -75,8 +73,6 @@ int SYMEXPORT alpm_db_unregister_all(void)
alpm_list_t *i;
pmdb_t *db;
- ALPM_LOG_FUNC;
-
/* Sanity checks */
ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
/* Do not unregister a database if a transaction is on-going */
@@ -97,8 +93,6 @@ int SYMEXPORT alpm_db_unregister(pmdb_t *db)
{
int found = 0;
- ALPM_LOG_FUNC;
-
/* Sanity checks */
ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
ASSERT(db != NULL, RET_ERR(PM_ERR_WRONG_ARGS, -1));
@@ -132,8 +126,6 @@ int SYMEXPORT alpm_db_unregister(pmdb_t *db)
/** Get the serverlist of a database. */
alpm_list_t SYMEXPORT *alpm_db_get_servers(const pmdb_t *db)
{
- ALPM_LOG_FUNC;
-
/* Sanity checks */
ASSERT(db != NULL, RET_ERR(PM_ERR_DB_NULL, NULL));
@@ -143,8 +135,6 @@ alpm_list_t SYMEXPORT *alpm_db_get_servers(const pmdb_t *db)
/** Set the serverlist of a database. */
int SYMEXPORT alpm_db_set_servers(pmdb_t *db, alpm_list_t *servers)
{
- ALPM_LOG_FUNC;
-
/* Sanity checks */
ASSERT(db != NULL, RET_ERR(PM_ERR_DB_NULL, -1));
@@ -175,8 +165,6 @@ int SYMEXPORT alpm_db_add_server(pmdb_t *db, const char *url)
{
char *newurl;
- ALPM_LOG_FUNC;
-
/* Sanity checks */
ASSERT(db != NULL, RET_ERR(PM_ERR_DB_NULL, -1));
ASSERT(url != NULL && strlen(url) != 0, RET_ERR(PM_ERR_WRONG_ARGS, -1));
@@ -202,8 +190,6 @@ int SYMEXPORT alpm_db_remove_server(pmdb_t *db, const char *url)
{
char *newurl, *vdata = NULL;
- ALPM_LOG_FUNC;
-
/* Sanity checks */
ASSERT(db != NULL, RET_ERR(PM_ERR_DB_NULL, -1));
ASSERT(url != NULL && strlen(url) != 0, RET_ERR(PM_ERR_WRONG_ARGS, -1));
@@ -230,8 +216,6 @@ int SYMEXPORT alpm_db_remove_server(pmdb_t *db, const char *url)
*/
int SYMEXPORT alpm_db_set_pgp_verify(pmdb_t *db, pgp_verify_t verify)
{
- ALPM_LOG_FUNC;
-
/* Sanity checks */
ASSERT(db != NULL, RET_ERR(PM_ERR_DB_NULL, -1));
@@ -245,8 +229,6 @@ int SYMEXPORT alpm_db_set_pgp_verify(pmdb_t *db, pgp_verify_t verify)
/** Get the name of a package database. */
const char SYMEXPORT *alpm_db_get_name(const pmdb_t *db)
{
- ALPM_LOG_FUNC;
-
/* Sanity checks */
ASSERT(handle != NULL, return NULL);
ASSERT(db != NULL, return NULL);
@@ -259,8 +241,6 @@ const char SYMEXPORT *alpm_db_get_url(const pmdb_t *db)
{
char *url;
- ALPM_LOG_FUNC;
-
/* Sanity checks */
ASSERT(handle != NULL, return NULL);
ASSERT(db != NULL, return NULL);
@@ -275,8 +255,6 @@ const char SYMEXPORT *alpm_db_get_url(const pmdb_t *db)
/** Get a package entry from a package database. */
pmpkg_t SYMEXPORT *alpm_db_get_pkg(pmdb_t *db, const char *name)
{
- ALPM_LOG_FUNC;
-
/* Sanity checks */
ASSERT(handle != NULL, return NULL);
ASSERT(db != NULL, return NULL);
@@ -288,8 +266,6 @@ pmpkg_t SYMEXPORT *alpm_db_get_pkg(pmdb_t *db, const char *name)
/** Get the package cache of a package database. */
alpm_list_t SYMEXPORT *alpm_db_get_pkgcache(pmdb_t *db)
{
- ALPM_LOG_FUNC;
-
/* Sanity checks */
ASSERT(handle != NULL, return NULL);
ASSERT(db != NULL, return NULL);
@@ -300,8 +276,6 @@ alpm_list_t SYMEXPORT *alpm_db_get_pkgcache(pmdb_t *db)
/** Get a group entry from a package database. */
pmgrp_t SYMEXPORT *alpm_db_readgrp(pmdb_t *db, const char *name)
{
- ALPM_LOG_FUNC;
-
/* Sanity checks */
ASSERT(handle != NULL, return NULL);
ASSERT(db != NULL, return NULL);
@@ -313,8 +287,6 @@ pmgrp_t SYMEXPORT *alpm_db_readgrp(pmdb_t *db, const char *name)
/** Get the group cache of a package database. */
alpm_list_t SYMEXPORT *alpm_db_get_grpcache(pmdb_t *db)
{
- ALPM_LOG_FUNC;
-
/* Sanity checks */
ASSERT(handle != NULL, return NULL);
ASSERT(db != NULL, return NULL);
@@ -325,8 +297,6 @@ alpm_list_t SYMEXPORT *alpm_db_get_grpcache(pmdb_t *db)
/** Searches a database. */
alpm_list_t SYMEXPORT *alpm_db_search(pmdb_t *db, const alpm_list_t* needles)
{
- ALPM_LOG_FUNC;
-
/* Sanity checks */
ASSERT(handle != NULL, return NULL);
ASSERT(db != NULL, return NULL);
@@ -337,8 +307,6 @@ alpm_list_t SYMEXPORT *alpm_db_search(pmdb_t *db, const alpm_list_t* needles)
/** Set install reason for a package in db. */
int SYMEXPORT alpm_db_set_pkgreason(pmdb_t *db, const char *name, pmpkgreason_t reason)
{
- ALPM_LOG_FUNC;
-
/* Sanity checks */
ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
ASSERT(db != NULL && name != NULL, RET_ERR(PM_ERR_WRONG_ARGS, -1));
@@ -369,8 +337,6 @@ pmdb_t *_alpm_db_new(const char *treename, int is_local)
{
pmdb_t *db;
- ALPM_LOG_FUNC;
-
CALLOC(db, 1, sizeof(pmdb_t), RET_ERR(PM_ERR_MEMORY, NULL));
STRDUP(db->treename, treename, RET_ERR(PM_ERR_MEMORY, NULL));
db->is_local = is_local;
@@ -380,8 +346,6 @@ pmdb_t *_alpm_db_new(const char *treename, int is_local)
void _alpm_db_free(pmdb_t *db)
{
- ALPM_LOG_FUNC;
-
/* cleanup pkgcache */
_alpm_db_free_pkgcache(db);
/* cleanup server list */
@@ -446,8 +410,6 @@ alpm_list_t *_alpm_db_search(pmdb_t *db, const alpm_list_t *needles)
/* copy the pkgcache- we will free the list var after each needle */
alpm_list_t *list = alpm_list_copy(_alpm_db_get_pkgcache(db));
- ALPM_LOG_FUNC;
-
for(i = needles; i; i = i->next) {
char *targ;
regex_t reg;
@@ -520,8 +482,6 @@ alpm_list_t *_alpm_db_search(pmdb_t *db, const alpm_list_t *needles)
*/
int _alpm_db_load_pkgcache(pmdb_t *db)
{
- ALPM_LOG_FUNC;
-
if(db == NULL) {
return -1;
}
@@ -541,8 +501,6 @@ int _alpm_db_load_pkgcache(pmdb_t *db)
void _alpm_db_free_pkgcache(pmdb_t *db)
{
- ALPM_LOG_FUNC;
-
if(db == NULL || !db->pkgcache_loaded) {
return;
}
@@ -560,8 +518,6 @@ void _alpm_db_free_pkgcache(pmdb_t *db)
pmpkghash_t *_alpm_db_get_pkgcache_hash(pmdb_t *db)
{
- ALPM_LOG_FUNC;
-
if(db == NULL) {
return NULL;
}
@@ -580,8 +536,6 @@ pmpkghash_t *_alpm_db_get_pkgcache_hash(pmdb_t *db)
alpm_list_t *_alpm_db_get_pkgcache(pmdb_t *db)
{
- ALPM_LOG_FUNC;
-
pmpkghash_t *hash = _alpm_db_get_pkgcache_hash(db);
if(hash == NULL) {
@@ -596,8 +550,6 @@ int _alpm_db_add_pkgincache(pmdb_t *db, pmpkg_t *pkg)
{
pmpkg_t *newpkg;
- ALPM_LOG_FUNC;
-
if(db == NULL || !db->pkgcache_loaded || pkg == NULL) {
return -1;
}
@@ -620,8 +572,6 @@ int _alpm_db_remove_pkgfromcache(pmdb_t *db, pmpkg_t *pkg)
{
pmpkg_t *data = NULL;
- ALPM_LOG_FUNC;
-
if(db == NULL || !db->pkgcache_loaded || pkg == NULL) {
return -1;
}
@@ -646,8 +596,6 @@ int _alpm_db_remove_pkgfromcache(pmdb_t *db, pmpkg_t *pkg)
pmpkg_t *_alpm_db_get_pkgfromcache(pmdb_t *db, const char *target)
{
- ALPM_LOG_FUNC;
-
if(db == NULL) {
return NULL;
}
@@ -668,8 +616,6 @@ int _alpm_db_load_grpcache(pmdb_t *db)
{
alpm_list_t *lp;
- ALPM_LOG_FUNC;
-
if(db == NULL) {
return -1;
}
@@ -716,8 +662,6 @@ void _alpm_db_free_grpcache(pmdb_t *db)
{
alpm_list_t *lg;
- ALPM_LOG_FUNC;
-
if(db == NULL || !db->grpcache_loaded) {
return;
}
@@ -735,8 +679,6 @@ void _alpm_db_free_grpcache(pmdb_t *db)
alpm_list_t *_alpm_db_get_grpcache(pmdb_t *db)
{
- ALPM_LOG_FUNC;
-
if(db == NULL) {
return NULL;
}
@@ -752,8 +694,6 @@ pmgrp_t *_alpm_db_get_grpfromcache(pmdb_t *db, const char *target)
{
alpm_list_t *i;
- ALPM_LOG_FUNC;
-
if(db == NULL || target == NULL || strlen(target) == 0) {
return NULL;
}