summaryrefslogtreecommitdiff
path: root/rpmdb
diff options
context:
space:
mode:
Diffstat (limited to 'rpmdb')
-rw-r--r--rpmdb/db3.c14
-rw-r--r--rpmdb/rpmdb.c30
-rw-r--r--rpmdb/sqlite.c42
3 files changed, 43 insertions, 43 deletions
diff --git a/rpmdb/db3.c b/rpmdb/db3.c
index 1dc9b998e..e84d4ddcb 100644
--- a/rpmdb/db3.c
+++ b/rpmdb/db3.c
@@ -173,7 +173,7 @@ static int db_fini(dbiIndex dbi, const char * dbhome,
rc = cvtdberr(dbi, "dbenv->close", rc, _debug);
if (dbfile)
- rpmlog(RPMLOG_DEBUG, _("closed db environment %s/%s\n"),
+ rpmlog(RPMLOG_DEBUG, "closed db environment %s/%s\n",
dbhome, dbfile);
if (rpmdb->db_remove_env) {
@@ -185,7 +185,7 @@ static int db_fini(dbiIndex dbi, const char * dbhome,
xx = cvtdberr(dbi, "dbenv->remove", xx, _debug);
if (dbfile)
- rpmlog(RPMLOG_DEBUG, _("removed db environment %s/%s\n"),
+ rpmlog(RPMLOG_DEBUG, "removed db environment %s/%s\n",
dbhome, dbfile);
}
@@ -240,7 +240,7 @@ static int db_init(dbiIndex dbi, const char * dbhome,
if (eflags & DB_JOINENV) eflags &= DB_JOINENV;
if (dbfile)
- rpmlog(RPMLOG_DEBUG, _("opening db environment %s/%s %s\n"),
+ rpmlog(RPMLOG_DEBUG, "opening db environment %s/%s %s\n",
dbhome, dbfile, prDbiOpenFlags(eflags, 1));
/* XXX Can't do RPC w/o host. */
@@ -679,7 +679,7 @@ static int db3close(dbiIndex dbi, unsigned int flags)
rc = cvtdberr(dbi, "db->close", rc, _printit);
db = dbi->dbi_db = NULL;
- rpmlog(RPMLOG_DEBUG, _("closed db index %s/%s\n"),
+ rpmlog(RPMLOG_DEBUG, "closed db index %s/%s\n",
dbhome, (dbfile ? dbfile : rpmTagGetName(dbi->dbi_rpmtag)));
}
@@ -736,7 +736,7 @@ static int db3close(dbiIndex dbi, unsigned int flags)
rc = db->verify(db, dbf, NULL, NULL, flags);
rc = cvtdberr(dbi, "db->verify", rc, _debug);
- rpmlog(RPMLOG_DEBUG, _("verified db index %s/%s\n"),
+ rpmlog(RPMLOG_DEBUG, "verified db index %s/%s\n",
(dbhome ? dbhome : ""),
(dbfile ? dbfile : rpmTagGetName(dbi->dbi_rpmtag)));
@@ -947,7 +947,7 @@ static int db3open(rpmdb rpmdb, rpmTag rpmtag, dbiIndex * dbip)
}
}
- rpmlog(RPMLOG_DEBUG, _("opening db index %s/%s %s mode=0x%x\n"),
+ rpmlog(RPMLOG_DEBUG, "opening db index %s/%s %s mode=0x%x\n",
dbhome, (dbfile ? dbfile : rpmTagGetName(dbi->dbi_rpmtag)),
prDbiOpenFlags(oflags, 0), dbi->dbi_mode);
@@ -1165,7 +1165,7 @@ static int db3open(rpmdb rpmdb, rpmTag rpmtag, dbiIndex * dbip)
dbhome, (dbfile ? dbfile : ""));
} else if (dbfile) {
rpmlog(RPMLOG_DEBUG,
- _("locked db index %s/%s\n"),
+ "locked db index %s/%s\n",
dbhome, dbfile);
}
}
diff --git a/rpmdb/rpmdb.c b/rpmdb/rpmdb.c
index 7a199348e..bde9374e3 100644
--- a/rpmdb/rpmdb.c
+++ b/rpmdb/rpmdb.c
@@ -240,7 +240,7 @@ dbiIndex dbiOpen(rpmdb db, rpmTag rpmtag, unsigned int flags)
default:
_dbapi = _dbapi_wanted;
if (_dbapi < 0 || _dbapi >= 5 || mydbvecs[_dbapi] == NULL) {
- rpmlog(RPMLOG_DEBUG, "dbiOpen: _dbiapi failed\n");
+ rpmlog(RPMLOG_ERR, _("dbiOpen: dbapi %d not available\n"), _dbapi);
return NULL;
}
errno = 0;
@@ -1603,7 +1603,7 @@ static int miregexec(miRE mire, const char * val)
char msg[256];
(void) regerror(rc, mire->preg, msg, sizeof(msg)-1);
msg[sizeof(msg)-1] = '\0';
- rpmlog(RPMLOG_ERR, "%s: regexec failed: %s\n",
+ rpmlog(RPMLOG_ERR, _("%s: regexec failed: %s\n"),
mire->pattern, msg);
rc = -1;
}
@@ -1784,7 +1784,7 @@ int rpmdbSetIteratorRE(rpmdbMatchIterator mi, rpmTag tag,
char msg[256];
(void) regerror(rc, preg, msg, sizeof(msg)-1);
msg[sizeof(msg)-1] = '\0';
- rpmlog(RPMLOG_ERR, "%s: regcomp failed: %s\n", allpat, msg);
+ rpmlog(RPMLOG_ERR, _("%s: regcomp failed: %s\n"), allpat, msg);
}
break;
case RPMMIRE_GLOB:
@@ -2600,11 +2600,11 @@ if (dbiByteSwapped(dbi) == 1)
if (!printed) {
if (rpmcnt == 1 && stringvalued) {
rpmlog(RPMLOG_DEBUG,
- _("removing \"%s\" from %s index.\n"),
+ "removing \"%s\" from %s index.\n",
(char *)key->data, rpmTagGetName(dbi->dbi_rpmtag));
} else {
rpmlog(RPMLOG_DEBUG,
- _("removing %d entries from %s index.\n"),
+ "removing %d entries from %s index.\n",
rpmcnt, rpmTagGetName(dbi->dbi_rpmtag));
}
printed++;
@@ -3012,11 +3012,11 @@ data->size = 0;
if (!printed) {
if (rpmcnt == 1 && stringvalued) {
rpmlog(RPMLOG_DEBUG,
- _("adding \"%s\" to %s index.\n"),
+ "adding \"%s\" to %s index.\n",
(char *)key->data, rpmTagGetName(dbi->dbi_rpmtag));
} else {
rpmlog(RPMLOG_DEBUG,
- _("adding %d entries to %s index.\n"),
+ "adding %d entries to %s index.\n",
rpmcnt, rpmTagGetName(dbi->dbi_rpmtag));
}
printed++;
@@ -3408,7 +3408,7 @@ static int rpmdbMoveDatabase(const char * prefix,
struct stat st;
if (!stat(mdb1, &st) && S_ISREG(st.st_mode) && !unlink(mdb1))
rpmlog(RPMLOG_DEBUG,
- _("removing %s after successful db3 rebuild.\n"), mdb1);
+ "removing %s after successful db3 rebuild.\n", mdb1);
}
#endif
return rc;
@@ -3439,7 +3439,7 @@ int rpmdbRebuild(const char * prefix, rpmts ts,
tfn = rpmGetPath("%{?_dbpath}", NULL);
if (!(tfn && tfn[0] != '\0'))
{
- rpmlog(RPMLOG_DEBUG, _("no dbpath has been set"));
+ rpmlog(RPMLOG_ERR, _("no dbpath has been set"));
rc = 1;
goto exit;
}
@@ -3465,7 +3465,7 @@ int rpmdbRebuild(const char * prefix, rpmts ts,
newdbpath += strlen(prefix) - 1;
tfn = _free(tfn);
- rpmlog(RPMLOG_DEBUG, _("rebuilding database %s into %s\n"),
+ rpmlog(RPMLOG_DEBUG, "rebuilding database %s into %s\n",
rootdbpath, newrootdbpath);
if (!access(newrootdbpath, F_OK)) {
@@ -3475,9 +3475,9 @@ int rpmdbRebuild(const char * prefix, rpmts ts,
goto exit;
}
- rpmlog(RPMLOG_DEBUG, _("creating directory %s\n"), newrootdbpath);
+ rpmlog(RPMLOG_DEBUG, "creating directory %s\n", newrootdbpath);
if (mkdir(newrootdbpath, 0755)) {
- rpmlog(RPMLOG_ERR, _("creating directory %s: %s\n"),
+ rpmlog(RPMLOG_ERR, _("failed to create directory %s: %s\n"),
newrootdbpath, strerror(errno));
rc = 1;
goto exit;
@@ -3486,7 +3486,7 @@ int rpmdbRebuild(const char * prefix, rpmts ts,
_rebuildinprogress = 0;
- rpmlog(RPMLOG_DEBUG, _("opening old database with dbapi %d\n"),
+ rpmlog(RPMLOG_DEBUG, "opening old database with dbapi %d\n",
_dbapi);
if (openDatabase(prefix, dbpath, _dbapi, &olddb, O_RDONLY, 0644,
RPMDB_FLAG_MINIMAL)) {
@@ -3495,7 +3495,7 @@ int rpmdbRebuild(const char * prefix, rpmts ts,
}
_dbapi = olddb->db_api;
_rebuildinprogress = 1;
- rpmlog(RPMLOG_DEBUG, _("opening new database with dbapi %d\n"),
+ rpmlog(RPMLOG_DEBUG, "opening new database with dbapi %d\n",
_dbapi_rebuild);
(void) rpmDefineMacro(NULL, "_rpmdb_rebuild %{nil}", -1);
if (openDatabase(prefix, newdbpath, _dbapi_rebuild, &newdb, O_RDWR | O_CREAT, 0644, 0)) {
@@ -3596,7 +3596,7 @@ int rpmdbRebuild(const char * prefix, rpmts ts,
exit:
if (removedir && !(rc == 0 && nocleanup)) {
- rpmlog(RPMLOG_DEBUG, _("removing directory %s\n"), newrootdbpath);
+ rpmlog(RPMLOG_DEBUG, "removing directory %s\n", newrootdbpath);
if (rmdir(newrootdbpath))
rpmlog(RPMLOG_ERR, _("failed to remove directory %s: %s\n"),
newrootdbpath, strerror(errno));
diff --git a/rpmdb/sqlite.c b/rpmdb/sqlite.c
index 3743f7e7a..5242b6a62 100644
--- a/rpmdb/sqlite.c
+++ b/rpmdb/sqlite.c
@@ -243,9 +243,9 @@ dbg_scp(scp);
}
if (scp->pStmt) {
xx = sqlite3_reset(scp->pStmt);
- if (xx) rpmlog(RPMLOG_WARNING, "reset %d\n", xx);
+ if (xx) rpmlog(RPMLOG_DEBUG, "reset %d\n", xx);
xx = sqlite3_finalize(scp->pStmt);
- if (xx) rpmlog(RPMLOG_WARNING, "finalize %d\n", xx);
+ if (xx) rpmlog(RPMLOG_DEBUG, "finalize %d\n", xx);
scp->pStmt = NULL;
}
@@ -681,7 +681,7 @@ fprintf(stderr, "\t%s(%d) type(%d) keytype %s\n", rpmTagGetName(dbi->dbi_rpmtag)
exit:
if (rc)
- rpmlog(RPMLOG_WARNING, "Unable to initDB %s (%d)\n",
+ rpmlog(RPMLOG_WARNING, _("Unable to initDB %s (%d)\n"),
scp->pzErrmsg, rc);
scp = scpFree(scp);
@@ -744,7 +744,7 @@ enterChroot(dbi);
(void) sqlite3_close(sqldb->db);
- rpmlog(RPMLOG_DEBUG, _("closed sql db %s\n"),
+ rpmlog(RPMLOG_DEBUG, "closed sql db %s\n",
dbi->dbi_subfile);
dbi->dbi_stats = _free(dbi->dbi_stats);
@@ -835,7 +835,7 @@ enterChroot(dbi);
dbfname = rpmGenPath(dbhome, dbi->dbi_file, NULL);
- rpmlog(RPMLOG_DEBUG, _("opening sql db %s (%s) mode=0x%x\n"),
+ rpmlog(RPMLOG_DEBUG, "opening sql db %s (%s) mode=0x%x\n",
dbfname, dbi->dbi_subfile, dbi->dbi_mode);
/* Open the Database */
@@ -854,7 +854,7 @@ enterChroot(dbi);
dbi->dbi_db = (DB *)sqldb;
if (sql_errcode != NULL) {
- rpmlog(RPMLOG_DEBUG, "Unable to open database: %s\n", sql_errcode);
+ rpmlog(RPMLOG_ERR, _("Unable to open database: %s\n"), sql_errcode);
rc = EINVAL;
}
@@ -951,14 +951,14 @@ enterChroot(dbi);
dbi->dbi_subfile);
rc = sqlite3_prepare(sqldb->db, scp->cmd, strlen(scp->cmd), &scp->pStmt, &scp->pzErrmsg);
- if (rc) rpmlog(RPMLOG_WARNING, "cdel(%s) prepare %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
+ if (rc) rpmlog(RPMLOG_DEBUG, "cdel(%s) prepare %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
rc = sql_bind_key(dbi, scp, 1, key);
- if (rc) rpmlog(RPMLOG_WARNING, "cdel(%s) bind key %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
+ if (rc) rpmlog(RPMLOG_DEBUG, "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) rpmlog(RPMLOG_WARNING, "cdel(%s) bind data %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
+ if (rc) rpmlog(RPMLOG_DEBUG, "cdel(%s) bind data %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
rc = sql_step(dbi, scp);
- if (rc) rpmlog(RPMLOG_WARNING, "cdel(%s) sql_step rc %d\n", dbi->dbi_subfile, rc);
+ if (rc) rpmlog(RPMLOG_DEBUG, "cdel(%s) sql_step rc %d\n", dbi->dbi_subfile, rc);
scp = scpFree(scp);
@@ -1026,10 +1026,10 @@ assert(dbi->dbi_rpmtag == RPMDBI_PACKAGES);
break;
}
rc = sqlite3_prepare(sqldb->db, scp->cmd, strlen(scp->cmd), &scp->pStmt, &scp->pzErrmsg);
- if (rc) rpmlog(RPMLOG_WARNING, "cget(%s) sequential prepare %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
+ if (rc) rpmlog(RPMLOG_DEBUG, "cget(%s) sequential prepare %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
rc = sql_step(dbi, scp);
- if (rc) rpmlog(RPMLOG_WARNING, "cget(%s) sequential sql_step rc %d\n", dbi->dbi_subfile, rc);
+ if (rc) rpmlog(RPMLOG_DEBUG, "cget(%s) sequential sql_step rc %d\n", dbi->dbi_subfile, rc);
scp = scpResetKeys(scp);
scp->nkeys = scp->nr;
@@ -1059,7 +1059,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) rpmlog(RPMLOG_WARNING, "cget(%s) prepare %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
+ if (rc) rpmlog(RPMLOG_DEBUG, "cget(%s) prepare %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
}
scp = scpResetAv(scp); /* Free av and avlen, reset counters.*/
@@ -1073,13 +1073,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) rpmlog(RPMLOG_WARNING, "cget(%s) key bind %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
+ if (rc) rpmlog(RPMLOG_DEBUG, "cget(%s) key bind %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
rc = sql_step(dbi, scp);
- if (rc) rpmlog(RPMLOG_WARNING, "cget(%s) sql_step rc %d\n", dbi->dbi_subfile, rc);
+ if (rc) rpmlog(RPMLOG_DEBUG, "cget(%s) sql_step rc %d\n", dbi->dbi_subfile, rc);
rc = sqlite3_reset(scp->pStmt);
- if (rc) rpmlog(RPMLOG_WARNING, "reset %d\n", rc);
+ if (rc) rpmlog(RPMLOG_DEBUG, "reset %d\n", rc);
/* 1 key should return 0 or 1 row/value */
assert(scp->nr < 2);
@@ -1169,14 +1169,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) rpmlog(RPMLOG_WARNING, "cput(%s) prepare %s (%d)\n",dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
+ if (rc) rpmlog(RPMLOG_DEBUG, "cput(%s) prepare %s (%d)\n",dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
rc = sql_bind_key(dbi, scp, 1, key);
- if (rc) rpmlog(RPMLOG_WARNING, "cput(%s) key bind %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
+ if (rc) rpmlog(RPMLOG_DEBUG, "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) rpmlog(RPMLOG_WARNING, "cput(%s) data bind %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
+ if (rc) rpmlog(RPMLOG_DEBUG, "cput(%s) data bind %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
rc = sql_step(dbi, scp);
- if (rc) rpmlog(RPMLOG_WARNING, "cput(%s) sql_step rc %d\n", dbi->dbi_subfile, rc);
+ if (rc) rpmlog(RPMLOG_DEBUG, "cput(%s) sql_step rc %d\n", dbi->dbi_subfile, rc);
break;
}
@@ -1219,7 +1219,7 @@ assert(scp->av != NULL);
rpmlog(RPMLOG_DEBUG, "db_info failed %s (%d)\n",
scp->pzErrmsg, sql_rc);
}
- rpmlog(RPMLOG_WARNING, "Unable to determine DB endian.\n");
+ rpmlog(RPMLOG_WARNING, _("Unable to determine DB endianess.\n"));
}
scp = scpFree(scp);