summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/db.c
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2011-07-01 18:01:38 +0200
committerAllan McRae <allan@archlinux.org>2011-07-01 18:01:38 +0200
commitca43fdd92f06a6997c53e45bfed6fb27f3044de5 (patch)
tree7e8602a60ee18b8bdee78d9064d6c3bc2eb09dc4 /lib/libalpm/db.c
parentd796d1cdda15889fc0793eae50582d75f07d55d5 (diff)
downloadpacman-ca43fdd92f06a6997c53e45bfed6fb27f3044de5.tar.gz
pacman-ca43fdd92f06a6997c53e45bfed6fb27f3044de5.tar.xz
Prefix alpm_loglevel_t members with ALPM
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm/db.c')
-rw-r--r--lib/libalpm/db.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c
index 6c1b95c0..b7f0c9a3 100644
--- a/lib/libalpm/db.c
+++ b/lib/libalpm/db.c
@@ -65,7 +65,7 @@ void _alpm_db_unregister(alpm_db_t *db)
return;
}
- _alpm_log(db->handle, PM_LOG_DEBUG, "unregistering database '%s'\n", db->treename);
+ _alpm_log(db->handle, ALPM_LOG_DEBUG, "unregistering database '%s'\n", db->treename);
_alpm_db_free(db);
}
@@ -175,7 +175,7 @@ int SYMEXPORT alpm_db_add_server(alpm_db_t *db, const char *url)
return -1;
}
db->servers = alpm_list_add(db->servers, newurl);
- _alpm_log(db->handle, PM_LOG_DEBUG, "adding new server URL to database '%s': %s\n",
+ _alpm_log(db->handle, ALPM_LOG_DEBUG, "adding new server URL to database '%s': %s\n",
db->treename, newurl);
return 0;
@@ -203,7 +203,7 @@ int SYMEXPORT alpm_db_remove_server(alpm_db_t *db, const char *url)
db->servers = alpm_list_remove_str(db->servers, newurl, &vdata);
free(newurl);
if(vdata) {
- _alpm_log(db->handle, PM_LOG_DEBUG, "removed server URL from database '%s': %s\n",
+ _alpm_log(db->handle, ALPM_LOG_DEBUG, "removed server URL from database '%s': %s\n",
db->treename, newurl);
free(vdata);
return 0;
@@ -299,7 +299,7 @@ int SYMEXPORT alpm_db_set_pkgreason(alpm_db_t *db, const char *name, alpm_pkgrea
RET_ERR(db->handle, PM_ERR_PKG_NOT_FOUND, -1);
}
- _alpm_log(db->handle, PM_LOG_DEBUG, "setting install reason %u for %s/%s\n", reason, db->treename, name);
+ _alpm_log(db->handle, ALPM_LOG_DEBUG, "setting install reason %u for %s/%s\n", reason, db->treename, name);
if(alpm_pkg_get_reason(pkg) == reason) {
/* we are done */
return 0;
@@ -352,7 +352,7 @@ const char *_alpm_db_path(alpm_db_t *db)
dbpath = alpm_option_get_dbpath(db->handle);
if(!dbpath) {
- _alpm_log(db->handle, PM_LOG_ERROR, _("database path is undefined\n"));
+ _alpm_log(db->handle, ALPM_LOG_ERROR, _("database path is undefined\n"));
RET_ERR(db->handle, PM_ERR_DB_OPEN, NULL);
}
@@ -366,7 +366,7 @@ const char *_alpm_db_path(alpm_db_t *db)
/* all sync DBs now reside in the sync/ subdir of the dbpath */
sprintf(db->_path, "%ssync/%s.db", dbpath, db->treename);
}
- _alpm_log(db->handle, PM_LOG_DEBUG, "database path for tree %s set to %s\n",
+ _alpm_log(db->handle, ALPM_LOG_DEBUG, "database path for tree %s set to %s\n",
db->treename, db->_path);
}
return db->_path;
@@ -409,7 +409,7 @@ alpm_list_t *_alpm_db_search(alpm_db_t *db, const alpm_list_t *needles)
}
ret = NULL;
targ = i->data;
- _alpm_log(db->handle, PM_LOG_DEBUG, "searching for target '%s'\n", targ);
+ _alpm_log(db->handle, ALPM_LOG_DEBUG, "searching for target '%s'\n", targ);
if(regcomp(&reg, targ, REG_EXTENDED | REG_NOSUB | REG_ICASE | REG_NEWLINE) != 0) {
RET_ERR(db->handle, PM_ERR_INVALID_REGEX, NULL);
@@ -451,7 +451,7 @@ alpm_list_t *_alpm_db_search(alpm_db_t *db, const alpm_list_t *needles)
}
if(matched != NULL) {
- _alpm_log(db->handle, PM_LOG_DEBUG, " search target '%s' matched '%s'\n",
+ _alpm_log(db->handle, ALPM_LOG_DEBUG, " search target '%s' matched '%s'\n",
targ, matched);
ret = alpm_list_add(ret, pkg);
}
@@ -474,10 +474,10 @@ static int load_pkgcache(alpm_db_t *db)
{
_alpm_db_free_pkgcache(db);
- _alpm_log(db->handle, PM_LOG_DEBUG, "loading package cache for repository '%s'\n",
+ _alpm_log(db->handle, ALPM_LOG_DEBUG, "loading package cache for repository '%s'\n",
db->treename);
if(db->ops->populate(db) == -1) {
- _alpm_log(db->handle, PM_LOG_DEBUG,
+ _alpm_log(db->handle, ALPM_LOG_DEBUG,
"failed to load package cache for repository '%s'\n", db->treename);
return -1;
}
@@ -492,7 +492,7 @@ void _alpm_db_free_pkgcache(alpm_db_t *db)
return;
}
- _alpm_log(db->handle, PM_LOG_DEBUG,
+ _alpm_log(db->handle, ALPM_LOG_DEBUG,
"freeing package cache for repository '%s'\n", db->treename);
alpm_list_free_inner(_alpm_db_get_pkgcache(db),
@@ -545,7 +545,7 @@ int _alpm_db_add_pkgincache(alpm_db_t *db, alpm_pkg_t *pkg)
return -1;
}
- _alpm_log(db->handle, PM_LOG_DEBUG, "adding entry '%s' in '%s' cache\n",
+ _alpm_log(db->handle, ALPM_LOG_DEBUG, "adding entry '%s' in '%s' cache\n",
alpm_pkg_get_name(newpkg), db->treename);
db->pkgcache = _alpm_pkghash_add_sorted(db->pkgcache, newpkg);
@@ -562,13 +562,13 @@ int _alpm_db_remove_pkgfromcache(alpm_db_t *db, alpm_pkg_t *pkg)
return -1;
}
- _alpm_log(db->handle, PM_LOG_DEBUG, "removing entry '%s' from '%s' cache\n",
+ _alpm_log(db->handle, ALPM_LOG_DEBUG, "removing entry '%s' from '%s' cache\n",
alpm_pkg_get_name(pkg), db->treename);
db->pkgcache = _alpm_pkghash_remove(db->pkgcache, pkg, &data);
if(data == NULL) {
/* package not found */
- _alpm_log(db->handle, PM_LOG_DEBUG, "cannot remove entry '%s' from '%s' cache: not found\n",
+ _alpm_log(db->handle, ALPM_LOG_DEBUG, "cannot remove entry '%s' from '%s' cache: not found\n",
alpm_pkg_get_name(pkg), db->treename);
return -1;
}
@@ -604,7 +604,7 @@ static int load_grpcache(alpm_db_t *db)
return -1;
}
- _alpm_log(db->handle, PM_LOG_DEBUG, "loading group cache for repository '%s'\n",
+ _alpm_log(db->handle, ALPM_LOG_DEBUG, "loading group cache for repository '%s'\n",
db->treename);
for(lp = _alpm_db_get_pkgcache(db); lp; lp = lp->next) {
@@ -654,7 +654,7 @@ void _alpm_db_free_groupcache(alpm_db_t *db)
return;
}
- _alpm_log(db->handle, PM_LOG_DEBUG,
+ _alpm_log(db->handle, ALPM_LOG_DEBUG,
"freeing group cache for repository '%s'\n", db->treename);
for(lg = db->grpcache; lg; lg = lg->next) {