diff options
author | Aaron Griffin <aaron@archlinux.org> | 2007-01-30 09:14:10 +0100 |
---|---|---|
committer | Aaron Griffin <aaron@archlinux.org> | 2007-01-30 09:14:10 +0100 |
commit | da648bc24cebcf3fff9073693871183fd95d4c92 (patch) | |
tree | 3fbea3f6f396b981f7d4bd3958d0147025d4a191 /lib/libalpm/cache.c | |
parent | 195e30e8aa1479bd10bb50de5bd34a69f0a09c9f (diff) | |
download | pacman-da648bc24cebcf3fff9073693871183fd95d4c92.tar.gz pacman-da648bc24cebcf3fff9073693871183fd95d4c92.tar.xz |
K. Piche <kevin.piche@cgi.com>
* ALPM_LOG_FUNCTION macro and all the great work to add this macro everywhere
Diffstat (limited to 'lib/libalpm/cache.c')
-rw-r--r-- | lib/libalpm/cache.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/libalpm/cache.c b/lib/libalpm/cache.c index 61633a1a..41b23c36 100644 --- a/lib/libalpm/cache.c +++ b/lib/libalpm/cache.c @@ -48,6 +48,8 @@ int _alpm_db_load_pkgcache(pmdb_t *db, pmdbinfrq_t infolevel) /* The group cache needs INFRQ_DESC as well */ /* pmdbinfrq_t infolevel = INFRQ_DEPENDS | INFRQ_DESC;*/ + ALPM_LOG_FUNC; + if(db == NULL) { return(-1); } @@ -72,6 +74,8 @@ int _alpm_db_load_pkgcache(pmdb_t *db, pmdbinfrq_t infolevel) void _alpm_db_free_pkgcache(pmdb_t *db) { + ALPM_LOG_FUNC; + if(db == NULL || db->pkgcache == NULL) { return; } @@ -88,6 +92,8 @@ void _alpm_db_free_pkgcache(pmdb_t *db) alpm_list_t *_alpm_db_get_pkgcache(pmdb_t *db, pmdbinfrq_t infolevel) { + ALPM_LOG_FUNC; + if(db == NULL) { return(NULL); } @@ -108,6 +114,8 @@ int _alpm_db_ensure_pkgcache(pmdb_t *db, pmdbinfrq_t infolevel) * info is not already cached */ + ALPM_LOG_FUNC; + alpm_list_t *p; for(p = db->pkgcache; p; p = p->next) { pmpkg_t *pkg = (pmpkg_t *)p->data; @@ -132,6 +140,8 @@ int _alpm_db_add_pkgincache(pmdb_t *db, pmpkg_t *pkg) { pmpkg_t *newpkg; + ALPM_LOG_FUNC; + if(db == NULL || pkg == NULL) { return(-1); } @@ -153,6 +163,8 @@ int _alpm_db_remove_pkgfromcache(pmdb_t *db, pmpkg_t *pkg) void *vdata; pmpkg_t *data; + ALPM_LOG_FUNC; + if(db == NULL || pkg == NULL) { return(-1); } @@ -174,6 +186,8 @@ int _alpm_db_remove_pkgfromcache(pmdb_t *db, pmpkg_t *pkg) pmpkg_t *_alpm_db_get_pkgfromcache(pmdb_t *db, char *target) { + ALPM_LOG_FUNC; + if(db == NULL) { return(NULL); } @@ -187,6 +201,8 @@ int _alpm_db_load_grpcache(pmdb_t *db) { alpm_list_t *lp; + ALPM_LOG_FUNC; + if(db == NULL) { return(-1); } @@ -231,6 +247,8 @@ void _alpm_db_free_grpcache(pmdb_t *db) { alpm_list_t *lg; + ALPM_LOG_FUNC; + if(db == NULL || db->grpcache == NULL) { return; } @@ -246,6 +264,8 @@ 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); } @@ -261,6 +281,8 @@ pmgrp_t *_alpm_db_get_grpfromcache(pmdb_t *db, char *target) { alpm_list_t *i; + ALPM_LOG_FUNC; + if(db == NULL || target == NULL || strlen(target) == 0) { return(NULL); } |