summaryrefslogtreecommitdiff
path: root/rpmdb/sqlite.c
diff options
context:
space:
mode:
Diffstat (limited to 'rpmdb/sqlite.c')
-rw-r--r--rpmdb/sqlite.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/rpmdb/sqlite.c b/rpmdb/sqlite.c
index b57278a8a..64c510733 100644
--- a/rpmdb/sqlite.c
+++ b/rpmdb/sqlite.c
@@ -241,9 +241,9 @@ dbg_scp(scp);
}
if (scp->pStmt) {
xx = sqlite3_reset(scp->pStmt);
- if (xx) rpmMessage(RPMMESS_WARNING, "reset %d\n", xx);
+ if (xx) rpmlog(RPMMESS_WARNING, "reset %d\n", xx);
xx = sqlite3_finalize(scp->pStmt);
- if (xx) rpmMessage(RPMMESS_WARNING, "finalize %d\n", xx);
+ if (xx) rpmlog(RPMMESS_WARNING, "finalize %d\n", xx);
scp->pStmt = NULL;
}
@@ -591,7 +591,7 @@ static int sql_busy_handler(void * dbi_void, int time)
{
dbiIndex dbi = (dbiIndex) dbi_void;
- rpmMessage(RPMMESS_WARNING, _("Unable to get lock on db %s, retrying... (%d)\n"),
+ rpmlog(RPMMESS_WARNING, _("Unable to get lock on db %s, retrying... (%d)\n"),
dbi->dbi_file, time);
(void) sleep(1);
@@ -679,7 +679,7 @@ fprintf(stderr, "\t%s(%d) type(%d) keytype %s\n", rpmTagGetName(dbi->dbi_rpmtag)
exit:
if (rc)
- rpmMessage(RPMMESS_WARNING, "Unable to initDB %s (%d)\n",
+ rpmlog(RPMMESS_WARNING, "Unable to initDB %s (%d)\n",
scp->pzErrmsg, rc);
scp = scpFree(scp);
@@ -742,7 +742,7 @@ enterChroot(dbi);
(void) sqlite3_close(sqldb->db);
- rpmMessage(RPMMESS_DEBUG, _("closed sql db %s\n"),
+ rpmlog(RPMMESS_DEBUG, _("closed sql db %s\n"),
dbi->dbi_subfile);
dbi->dbi_stats = _free(dbi->dbi_stats);
@@ -832,7 +832,7 @@ enterChroot(dbi);
dbfname = rpmGenPath(dbhome, dbi->dbi_file, NULL);
- rpmMessage(RPMMESS_DEBUG, _("opening sql db %s (%s) mode=0x%x\n"),
+ rpmlog(RPMMESS_DEBUG, _("opening sql db %s (%s) mode=0x%x\n"),
dbfname, dbi->dbi_subfile, dbi->dbi_mode);
/* Open the Database */
@@ -851,7 +851,7 @@ enterChroot(dbi);
dbi->dbi_db = (DB *)sqldb;
if (sql_errcode != NULL) {
- rpmMessage(RPMMESS_DEBUG, "Unable to open database: %s\n", sql_errcode);
+ rpmlog(RPMMESS_DEBUG, "Unable to open database: %s\n", sql_errcode);
rc = EINVAL;
}
@@ -948,14 +948,14 @@ enterChroot(dbi);
dbi->dbi_subfile);
rc = sqlite3_prepare(sqldb->db, scp->cmd, strlen(scp->cmd), &scp->pStmt, &scp->pzErrmsg);
- if (rc) rpmMessage(RPMMESS_WARNING, "cdel(%s) prepare %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
+ if (rc) rpmlog(RPMMESS_WARNING, "cdel(%s) prepare %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
rc = sql_bind_key(dbi, scp, 1, key);
- if (rc) rpmMessage(RPMMESS_WARNING, "cdel(%s) bind key %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
+ if (rc) rpmlog(RPMMESS_WARNING, "cdel(%s) bind key %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
rc = sql_bind_data(dbi, scp, 2, data);
- if (rc) rpmMessage(RPMMESS_WARNING, "cdel(%s) bind data %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
+ if (rc) rpmlog(RPMMESS_WARNING, "cdel(%s) bind data %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
rc = sql_step(dbi, scp);
- if (rc) rpmMessage(RPMMESS_WARNING, "cdel(%s) sql_step rc %d\n", dbi->dbi_subfile, rc);
+ if (rc) rpmlog(RPMMESS_WARNING, "cdel(%s) sql_step rc %d\n", dbi->dbi_subfile, rc);
scp = scpFree(scp);
@@ -1023,10 +1023,10 @@ assert(dbi->dbi_rpmtag == RPMDBI_PACKAGES);
break;
}
rc = sqlite3_prepare(sqldb->db, scp->cmd, strlen(scp->cmd), &scp->pStmt, &scp->pzErrmsg);
- if (rc) rpmMessage(RPMMESS_WARNING, "cget(%s) sequential prepare %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
+ if (rc) rpmlog(RPMMESS_WARNING, "cget(%s) sequential prepare %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
rc = sql_step(dbi, scp);
- if (rc) rpmMessage(RPMMESS_WARNING, "cget(%s) sequential sql_step rc %d\n", dbi->dbi_subfile, rc);
+ if (rc) rpmlog(RPMMESS_WARNING, "cget(%s) sequential sql_step rc %d\n", dbi->dbi_subfile, rc);
scp = scpResetKeys(scp);
scp->nkeys = scp->nr;
@@ -1056,7 +1056,7 @@ assert(dbi->dbi_rpmtag == RPMDBI_PACKAGES);
scp->cmd = sqlite3_mprintf("SELECT value FROM '%q' WHERE key=?;", dbi->dbi_subfile);
rc = sqlite3_prepare(sqldb->db, scp->cmd, strlen(scp->cmd), &scp->pStmt, &scp->pzErrmsg);
- if (rc) rpmMessage(RPMMESS_WARNING, "cget(%s) prepare %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
+ if (rc) rpmlog(RPMMESS_WARNING, "cget(%s) prepare %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
}
scp = scpResetAv(scp); /* Free av and avlen, reset counters.*/
@@ -1070,13 +1070,13 @@ assert(dbi->dbi_rpmtag == RPMDBI_PACKAGES);
/* Bind key to prepared statement */
rc = sql_bind_key(dbi, scp, 1, scp->keys[scp->rx]);
- if (rc) rpmMessage(RPMMESS_WARNING, "cget(%s) key bind %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
+ if (rc) rpmlog(RPMMESS_WARNING, "cget(%s) key bind %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
rc = sql_step(dbi, scp);
- if (rc) rpmMessage(RPMMESS_WARNING, "cget(%s) sql_step rc %d\n", dbi->dbi_subfile, rc);
+ if (rc) rpmlog(RPMMESS_WARNING, "cget(%s) sql_step rc %d\n", dbi->dbi_subfile, rc);
rc = sqlite3_reset(scp->pStmt);
- if (rc) rpmMessage(RPMMESS_WARNING, "reset %d\n", rc);
+ if (rc) rpmlog(RPMMESS_WARNING, "reset %d\n", rc);
/* 1 key should return 0 or 1 row/value */
assert(scp->nr < 2);
@@ -1166,14 +1166,14 @@ enterChroot(dbi);
scp->cmd = sqlite3_mprintf("INSERT OR REPLACE INTO '%q' VALUES(?, ?);",
dbi->dbi_subfile);
rc = sqlite3_prepare(sqldb->db, scp->cmd, strlen(scp->cmd), &scp->pStmt, &scp->pzErrmsg);
- if (rc) rpmMessage(RPMMESS_WARNING, "cput(%s) prepare %s (%d)\n",dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
+ if (rc) rpmlog(RPMMESS_WARNING, "cput(%s) prepare %s (%d)\n",dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
rc = sql_bind_key(dbi, scp, 1, key);
- if (rc) rpmMessage(RPMMESS_WARNING, "cput(%s) key bind %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
+ if (rc) rpmlog(RPMMESS_WARNING, "cput(%s) key bind %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
rc = sql_bind_data(dbi, scp, 2, data);
- if (rc) rpmMessage(RPMMESS_WARNING, "cput(%s) data bind %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
+ if (rc) rpmlog(RPMMESS_WARNING, "cput(%s) data bind %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
rc = sql_step(dbi, scp);
- if (rc) rpmMessage(RPMMESS_WARNING, "cput(%s) sql_step rc %d\n", dbi->dbi_subfile, rc);
+ if (rc) rpmlog(RPMMESS_WARNING, "cput(%s) sql_step rc %d\n", dbi->dbi_subfile, rc);
break;
}
@@ -1213,10 +1213,10 @@ assert(scp->av != NULL);
} else {
if ( sql_rc ) {
- rpmMessage(RPMMESS_DEBUG, "db_info failed %s (%d)\n",
+ rpmlog(RPMMESS_DEBUG, "db_info failed %s (%d)\n",
scp->pzErrmsg, sql_rc);
}
- rpmMessage(RPMMESS_WARNING, "Unable to determine DB endian.\n");
+ rpmlog(RPMMESS_WARNING, "Unable to determine DB endian.\n");
}
scp = scpFree(scp);
@@ -1344,11 +1344,11 @@ enterChroot(dbi);
assert(scp->av != NULL);
nkeys = strtol(scp->av[1], NULL, 10);
- rpmMessage(RPMMESS_DEBUG, " stat on %s nkeys %ld\n",
+ rpmlog(RPMMESS_DEBUG, " stat on %s nkeys %ld\n",
dbi->dbi_subfile, nkeys);
} else {
if ( rc ) {
- rpmMessage(RPMMESS_DEBUG, "stat failed %s (%d)\n",
+ rpmlog(RPMMESS_DEBUG, "stat failed %s (%d)\n",
scp->pzErrmsg, rc);
}
}