Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/cache.c')
-rw-r--r--lib/libalpm/cache.c22
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);
}