RPM Package Manager, CVS Repository
http://rpm5.org/cvs/
____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson
Root: /v/rpm/cvs Email: jbj@rpm5.org
Module: rpm Date: 30-Jul-2007 14:30:55
Branch: HEAD Handle: 2007073013305400
Modified files:
rpm/rpmdb rpmdb.c sqlite.c
Log:
i18n for debug msgs.
Summary:
Revision Changes Path
1.142 +17 -17 rpm/rpmdb/rpmdb.c
1.12 +6 -6 rpm/rpmdb/sqlite.c
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: rpm/rpmdb/rpmdb.c
============================================================================
$ cvs diff -u -r1.141 -r1.142 rpmdb.c
--- rpm/rpmdb/rpmdb.c 23 Jul 2007 08:45:08 -0000 1.141
+++ rpm/rpmdb/rpmdb.c 30 Jul 2007 12:30:54 -0000 1.142
@@ -307,7 +307,7 @@
default:
_dbapi = _dbapi_wanted;
if (_dbapi < 0 || _dbapi >= 5 || mydbvecs[_dbapi] == NULL) {
- rpmMessage(RPMMESS_DEBUG, "dbiOpen: _dbiapi failed\n");
+ rpmMessage(RPMMESS_DEBUG, D_("dbiOpen: _dbiapi failed\n"));
return NULL;
}
errno = 0;
@@ -733,7 +733,7 @@
if (rpmdbCheckTerminate(0)) {
/*@-abstract@*/ /* sigset_t is abstract type */
- rpmMessage(RPMMESS_DEBUG, "Exiting on signal(0x%lx) ...\n", *((unsigned long *)&rpmsqCaught));
+ rpmMessage(RPMMESS_DEBUG, D_("Exiting on signal(0x%lx) ...\n"), *((unsigned long *)&rpmsqCaught));
/*@=abstract@*/
exit(EXIT_FAILURE);
}
@@ -2952,11 +2952,11 @@
if (!printed) {
if (rpmcnt == 1 && stringvalued) {
rpmMessage(RPMMESS_DEBUG,
- _("removing \"%s\" from %s index.\n"),
+ D_("removing \"%s\" from %s index.\n"),
(char *)key->data, tagName(dbi->dbi_rpmtag));
} else {
rpmMessage(RPMMESS_DEBUG,
- _("removing %d entries from %s index.\n"),
+ D_("removing %d entries from %s index.\n"),
rpmcnt, tagName(dbi->dbi_rpmtag));
}
printed++;
@@ -3423,11 +3423,11 @@
if (!printed) {
if (rpmcnt == 1 && stringvalued) {
rpmMessage(RPMMESS_DEBUG,
- _("adding \"%s\" to %s index.\n"),
+ D_("adding \"%s\" to %s index.\n"),
(char *)key->data, tagName(dbi->dbi_rpmtag));
} else {
rpmMessage(RPMMESS_DEBUG,
- _("adding %d entries to %s index.\n"),
+ D_("adding %d entries to %s index.\n"),
rpmcnt, tagName(dbi->dbi_rpmtag));
}
printed++;
@@ -3797,7 +3797,7 @@
if (!rpmioFileExists(ofilename)) {
if (rpmioFileExists(nfilename)) {
- rpmMessage(RPMMESS_DEBUG, _("removing file \"%s\"\n"), nfilename);
+ rpmMessage(RPMMESS_DEBUG, D_("removing file \"%s\"\n"), nfilename);
xx = unlink(nfilename);
}
continue;
@@ -3811,8 +3811,8 @@
if (stat(ofilename, nst) < 0)
continue;
- rpmMessage(RPMMESS_DEBUG, _("moving file from \"%s\"\n"), ofilename);
- rpmMessage(RPMMESS_DEBUG, _("moving file to \"%s\"\n"), nfilename);
+ rpmMessage(RPMMESS_DEBUG, D_("moving file from \"%s\"\n"), ofilename);
+ rpmMessage(RPMMESS_DEBUG, D_("moving file to \"%s\"\n"), nfilename);
if ((xx = rename(ofilename, nfilename)) != 0) {
rc = 1;
continue;
@@ -3829,13 +3829,13 @@
sprintf(ofilename, "%s/%s/__db.%03d", prefix, olddbpath, i);
(void)rpmCleanPath(ofilename);
if (rpmioFileExists(ofilename)) {
- rpmMessage(RPMMESS_DEBUG, _("removing region file \"%s\"\n"), ofilename);
+ rpmMessage(RPMMESS_DEBUG, D_("removing region file \"%s\"\n"), ofilename);
xx = unlink(ofilename);
}
sprintf(nfilename, "%s/%s/__db.%03d", prefix, newdbpath, i);
(void)rpmCleanPath(nfilename);
if (rpmioFileExists(nfilename)) {
- rpmMessage(RPMMESS_DEBUG, _("removing region file \"%s\"\n"), nfilename);
+ rpmMessage(RPMMESS_DEBUG, D_("removing region file \"%s\"\n"), nfilename);
xx = unlink(nfilename);
}
}
@@ -3886,7 +3886,7 @@
if (!(tfn && tfn[0] != '\0'))
/*@=boundsread@*/
{
- rpmMessage(RPMMESS_DEBUG, _("no dbpath has been set"));
+ rpmMessage(RPMMESS_DEBUG, D_("no dbpath has been set"));
rc = 1;
goto exit;
}
@@ -3918,7 +3918,7 @@
newdbpath += strlen(prefix) - 1;
tfn = _free(tfn);
- rpmMessage(RPMMESS_DEBUG, _("rebuilding database %s into %s\n"),
+ rpmMessage(RPMMESS_DEBUG, D_("rebuilding database %s into %s\n"),
rootdbpath, newrootdbpath);
if (!Access(newrootdbpath, F_OK)) {
@@ -3928,7 +3928,7 @@
goto exit;
}
- rpmMessage(RPMMESS_DEBUG, _("creating directory %s\n"), newrootdbpath);
+ rpmMessage(RPMMESS_DEBUG, D_("creating directory %s\n"), newrootdbpath);
if (Mkdir(newrootdbpath, 0755)) {
rpmError(RPMERR_MKDIR, _("creating directory %s: %s\n"),
newrootdbpath, strerror(errno));
@@ -3939,7 +3939,7 @@
_rebuildinprogress = 0;
- rpmMessage(RPMMESS_DEBUG, _("opening old database with dbapi %d\n"),
+ rpmMessage(RPMMESS_DEBUG, D_("opening old database with dbapi %d\n"),
_dbapi);
/*@-boundswrite@*/
if (rpmdbOpenDatabase(prefix, dbpath, _dbapi, &olddb, O_RDONLY, 0644,
@@ -3950,7 +3950,7 @@
/*@=boundswrite@*/
_dbapi = olddb->db_api;
_rebuildinprogress = 1;
- rpmMessage(RPMMESS_DEBUG, _("opening new database with dbapi %d\n"),
+ rpmMessage(RPMMESS_DEBUG, D_("opening new database with dbapi %d\n"),
_dbapi_rebuild);
(void) rpmDefineMacro(NULL, "_rpmdb_rebuild %{nil}", -1);
/*@-boundswrite@*/
@@ -4059,7 +4059,7 @@
exit:
if (removedir && !(rc == 0 && nocleanup)) {
- rpmMessage(RPMMESS_DEBUG, _("removing directory %s\n"), newrootdbpath);
+ rpmMessage(RPMMESS_DEBUG, D_("removing directory %s\n"), newrootdbpath);
if (Rmdir(newrootdbpath))
rpmMessage(RPMMESS_ERROR, _("failed to remove directory %s: %s\n"),
newrootdbpath, strerror(errno));
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmdb/sqlite.c
============================================================================
$ cvs diff -u -r1.11 -r1.12 sqlite.c
--- rpm/rpmdb/sqlite.c 22 Jul 2007 19:30:26 -0000 1.11
+++ rpm/rpmdb/sqlite.c 30 Jul 2007 12:30:54 -0000 1.12
@@ -858,7 +858,7 @@
(void) sqlite3_close(sqldb->db);
- rpmMessage(RPMMESS_DEBUG, _("closed sql db %s\n"),
+ rpmMessage(RPMMESS_DEBUG, D_("closed sql db %s\n"),
dbi->dbi_subfile);
#if defined(MAYBE) /* XXX should SQLite and BDB have different semantics? */
@@ -974,7 +974,7 @@
else
dbfname = rpmGenPath(dbhome, dbi->dbi_file, NULL);
- rpmMessage(RPMMESS_DEBUG, _("opening sql db %s (%s) mode=0x%x\n"),
+ rpmMessage(RPMMESS_DEBUG, D_("opening sql db %s (%s) mode=0x%x\n"),
dbfname, dbi->dbi_subfile, dbi->dbi_mode);
/* Open the Database */
@@ -1003,7 +1003,7 @@
dbi->dbi_db = (DB *)sqldb;
if (sql_errcode != NULL) {
- rpmMessage(RPMMESS_DEBUG, "Unable to open database: %s\n", sql_errcode);
+ rpmMessage(RPMMESS_DEBUG, D_("Unable to open database: %s\n"), sql_errcode);
rc = EINVAL;
}
@@ -1382,7 +1382,7 @@
} else {
if ( sql_rc ) {
- rpmMessage(RPMMESS_DEBUG, "db_info failed %s (%d)\n",
+ rpmMessage(RPMMESS_DEBUG, D_("db_info failed %s (%d)\n"),
scp->pzErrmsg, sql_rc);
}
rpmMessage(RPMMESS_WARNING, "Unable to determine DB endian.\n");
@@ -1528,11 +1528,11 @@
assert(scp->av != NULL);
nkeys = strtol(scp->av[1], NULL, 10);
- rpmMessage(RPMMESS_DEBUG, " stat on %s nkeys %ld\n",
+ rpmMessage(RPMMESS_DEBUG, D_(" stat on %s nkeys %ld\n"),
dbi->dbi_subfile, nkeys);
} else {
if ( rc ) {
- rpmMessage(RPMMESS_DEBUG, "stat failed %s (%d)\n",
+ rpmMessage(RPMMESS_DEBUG, D_("stat failed %s (%d)\n"),
scp->pzErrmsg, rc);
}
}
@@ .
Received on Mon Jul 30 14:30:55 2007