Remove gettext from any alpm_logaction calls
We shouldn't translate log messages to pacman.log so it is consistant and can be parsed by other tools. Remove all gettext _() around these strings. Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
a2186a43a8
commit
4906e15d0d
5 changed files with 31 additions and 23 deletions
|
@ -485,7 +485,7 @@ int _alpm_add_commit(pmtrans_t *trans, pmdb_t *db)
|
||||||
/* if a file is in NoExtract then we never extract it */
|
/* if a file is in NoExtract then we never extract it */
|
||||||
if(alpm_list_find_str(handle->noextract, entryname)) {
|
if(alpm_list_find_str(handle->noextract, entryname)) {
|
||||||
_alpm_log(PM_LOG_DEBUG, _("%s is in NoExtract, skipping extraction"), entryname);
|
_alpm_log(PM_LOG_DEBUG, _("%s is in NoExtract, skipping extraction"), entryname);
|
||||||
alpm_logaction(_("%s is in NoExtract, skipping extraction"), entryname);
|
alpm_logaction("note: %s is in NoExtract, skipping extraction", entryname);
|
||||||
archive_read_data_skip(archive);
|
archive_read_data_skip(archive);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -545,7 +545,7 @@ int _alpm_add_commit(pmtrans_t *trans, pmdb_t *db)
|
||||||
} else if(ret != ARCHIVE_OK) {
|
} else if(ret != ARCHIVE_OK) {
|
||||||
_alpm_log(PM_LOG_ERROR, _("could not extract %s (%s)"),
|
_alpm_log(PM_LOG_ERROR, _("could not extract %s (%s)"),
|
||||||
entryname, archive_error_string(archive));
|
entryname, archive_error_string(archive));
|
||||||
alpm_logaction(_("could not extract %s (%s)"),
|
alpm_logaction("error: could not extract %s (%s)",
|
||||||
entryname, archive_error_string(archive));
|
entryname, archive_error_string(archive));
|
||||||
errors++;
|
errors++;
|
||||||
unlink(tempfile);
|
unlink(tempfile);
|
||||||
|
@ -611,19 +611,19 @@ int _alpm_add_commit(pmtrans_t *trans, pmdb_t *db)
|
||||||
if(rename(filename, newpath)) {
|
if(rename(filename, newpath)) {
|
||||||
archive_entry_set_pathname(entry, filename);
|
archive_entry_set_pathname(entry, filename);
|
||||||
_alpm_log(PM_LOG_ERROR, _("could not rename %s (%s)"), filename, strerror(errno));
|
_alpm_log(PM_LOG_ERROR, _("could not rename %s (%s)"), filename, strerror(errno));
|
||||||
alpm_logaction(_("error: could not rename %s (%s)"), filename, strerror(errno));
|
alpm_logaction("error: could not rename %s (%s)", filename, strerror(errno));
|
||||||
errors++;
|
errors++;
|
||||||
} else {
|
} else {
|
||||||
/* copy the tempfile we extracted to the real path */
|
/* copy the tempfile we extracted to the real path */
|
||||||
if(_alpm_copyfile(tempfile, filename)) {
|
if(_alpm_copyfile(tempfile, filename)) {
|
||||||
archive_entry_set_pathname(entry, filename);
|
archive_entry_set_pathname(entry, filename);
|
||||||
_alpm_log(PM_LOG_ERROR, _("could not copy tempfile to %s (%s)"), filename, strerror(errno));
|
_alpm_log(PM_LOG_ERROR, _("could not copy tempfile to %s (%s)"), filename, strerror(errno));
|
||||||
alpm_logaction(_("error: could not copy tempfile to %s (%s)"), filename, strerror(errno));
|
alpm_logaction("error: could not copy tempfile to %s (%s)", filename, strerror(errno));
|
||||||
errors++;
|
errors++;
|
||||||
} else {
|
} else {
|
||||||
archive_entry_set_pathname(entry, filename);
|
archive_entry_set_pathname(entry, filename);
|
||||||
_alpm_log(PM_LOG_WARNING, _("%s saved as %s"), filename, newpath);
|
_alpm_log(PM_LOG_WARNING, _("%s saved as %s"), filename, newpath);
|
||||||
alpm_logaction(_("warning: %s saved as %s"), filename, newpath);
|
alpm_logaction("warning: %s saved as %s", filename, newpath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -661,10 +661,10 @@ int _alpm_add_commit(pmtrans_t *trans, pmdb_t *db)
|
||||||
snprintf(newpath, PATH_MAX, "%s.pacnew", filename);
|
snprintf(newpath, PATH_MAX, "%s.pacnew", filename);
|
||||||
if(_alpm_copyfile(tempfile, newpath)) {
|
if(_alpm_copyfile(tempfile, newpath)) {
|
||||||
_alpm_log(PM_LOG_ERROR, _("could not install %s as %s: %s"), filename, newpath, strerror(errno));
|
_alpm_log(PM_LOG_ERROR, _("could not install %s as %s: %s"), filename, newpath, strerror(errno));
|
||||||
alpm_logaction(_("error: could not install %s as %s: %s"), filename, newpath, strerror(errno));
|
alpm_logaction("error: could not install %s as %s: %s", filename, newpath, strerror(errno));
|
||||||
} else {
|
} else {
|
||||||
_alpm_log(PM_LOG_WARNING, _("%s installed as %s"), filename, newpath);
|
_alpm_log(PM_LOG_WARNING, _("%s installed as %s"), filename, newpath);
|
||||||
alpm_logaction(_("warning: %s installed as %s"), filename, newpath);
|
alpm_logaction("warning: %s installed as %s", filename, newpath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -680,7 +680,7 @@ int _alpm_add_commit(pmtrans_t *trans, pmdb_t *db)
|
||||||
if(notouch) {
|
if(notouch) {
|
||||||
_alpm_log(PM_LOG_DEBUG, _("%s is in NoUpgrade -- skipping"), filename);
|
_alpm_log(PM_LOG_DEBUG, _("%s is in NoUpgrade -- skipping"), filename);
|
||||||
_alpm_log(PM_LOG_WARNING, _("extracting %s as %s.pacnew"), filename, filename);
|
_alpm_log(PM_LOG_WARNING, _("extracting %s as %s.pacnew"), filename, filename);
|
||||||
alpm_logaction(_("warning: extracting %s as %s.pacnew"), filename, filename);
|
alpm_logaction("warning: extracting %s as %s.pacnew", filename, filename);
|
||||||
strncat(filename, ".pacnew", PATH_MAX);
|
strncat(filename, ".pacnew", PATH_MAX);
|
||||||
} else {
|
} else {
|
||||||
_alpm_log(PM_LOG_DEBUG, _("extracting %s"), filename);
|
_alpm_log(PM_LOG_DEBUG, _("extracting %s"), filename);
|
||||||
|
@ -713,7 +713,7 @@ int _alpm_add_commit(pmtrans_t *trans, pmdb_t *db)
|
||||||
} else if(ret != ARCHIVE_OK) {
|
} else if(ret != ARCHIVE_OK) {
|
||||||
_alpm_log(PM_LOG_ERROR, _("could not extract %s (%s)"),
|
_alpm_log(PM_LOG_ERROR, _("could not extract %s (%s)"),
|
||||||
entryname, archive_error_string(archive));
|
entryname, archive_error_string(archive));
|
||||||
alpm_logaction(_("could not extract %s (%s)"),
|
alpm_logaction("error: could not extract %s (%s)",
|
||||||
entryname, archive_error_string(archive));
|
entryname, archive_error_string(archive));
|
||||||
errors++;
|
errors++;
|
||||||
continue;
|
continue;
|
||||||
|
@ -761,10 +761,17 @@ int _alpm_add_commit(pmtrans_t *trans, pmdb_t *db)
|
||||||
|
|
||||||
if(errors) {
|
if(errors) {
|
||||||
ret = 1;
|
ret = 1;
|
||||||
_alpm_log(PM_LOG_ERROR, _("errors occurred while %s %s"),
|
if(is_upgrade) {
|
||||||
(is_upgrade ? _("upgrading") : _("installing")), newpkg->name);
|
_alpm_log(PM_LOG_ERROR, _("problem occurred while upgrading %s"),
|
||||||
alpm_logaction(_("errors occurred while %s %s"),
|
newpkg->name);
|
||||||
(is_upgrade ? _("upgrading") : _("installing")), newpkg->name);
|
alpm_logaction("error: problem occurred while upgrading %s",
|
||||||
|
newpkg->name);
|
||||||
|
} else {
|
||||||
|
_alpm_log(PM_LOG_ERROR, _("problem occurred while installing %s"),
|
||||||
|
newpkg->name);
|
||||||
|
alpm_logaction("error: problem occurred while installing %s",
|
||||||
|
newpkg->name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -798,7 +805,8 @@ int _alpm_add_commit(pmtrans_t *trans, pmdb_t *db)
|
||||||
|
|
||||||
if(_alpm_db_write(db, provpkg, INFRQ_DEPENDS)) {
|
if(_alpm_db_write(db, provpkg, INFRQ_DEPENDS)) {
|
||||||
_alpm_log(PM_LOG_ERROR, _("could not update provision '%s' from '%s'"), provname, pkgname);
|
_alpm_log(PM_LOG_ERROR, _("could not update provision '%s' from '%s'"), provname, pkgname);
|
||||||
alpm_logaction(_("could not update provision '%s' from '%s'"), provname, pkgname);
|
alpm_logaction("error: could not update provision '%s' from '%s'",
|
||||||
|
provname, pkgname);
|
||||||
RET_ERR(PM_ERR_DB_WRITE, -1);
|
RET_ERR(PM_ERR_DB_WRITE, -1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -817,7 +825,7 @@ int _alpm_add_commit(pmtrans_t *trans, pmdb_t *db)
|
||||||
if(_alpm_db_write(db, newpkg, INFRQ_ALL)) {
|
if(_alpm_db_write(db, newpkg, INFRQ_ALL)) {
|
||||||
_alpm_log(PM_LOG_ERROR, _("could not update database entry %s-%s"),
|
_alpm_log(PM_LOG_ERROR, _("could not update database entry %s-%s"),
|
||||||
alpm_pkg_get_name(newpkg), alpm_pkg_get_version(newpkg));
|
alpm_pkg_get_name(newpkg), alpm_pkg_get_version(newpkg));
|
||||||
alpm_logaction(_("could not update database entry %s-%s"),
|
alpm_logaction("error: could not update database entry %s-%s",
|
||||||
alpm_pkg_get_name(newpkg), alpm_pkg_get_version(newpkg));
|
alpm_pkg_get_name(newpkg), alpm_pkg_get_version(newpkg));
|
||||||
RET_ERR(PM_ERR_DB_WRITE, -1);
|
RET_ERR(PM_ERR_DB_WRITE, -1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -775,7 +775,7 @@ int _alpm_sync_commit(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t **data)
|
||||||
/* cache directory does not exist.... try creating it */
|
/* cache directory does not exist.... try creating it */
|
||||||
_alpm_log(PM_LOG_WARNING, _("no %s cache exists, creating...\n"),
|
_alpm_log(PM_LOG_WARNING, _("no %s cache exists, creating...\n"),
|
||||||
cachedir);
|
cachedir);
|
||||||
alpm_logaction(_("warning: no %s cache exists, creating..."),
|
alpm_logaction("warning: no %s cache exists, creating...",
|
||||||
cachedir);
|
cachedir);
|
||||||
if(_alpm_makepath(cachedir) == 0) {
|
if(_alpm_makepath(cachedir) == 0) {
|
||||||
_alpm_log(PM_LOG_DEBUG, _("setting main cachedir: %s"), cachedir);
|
_alpm_log(PM_LOG_DEBUG, _("setting main cachedir: %s"), cachedir);
|
||||||
|
@ -800,7 +800,7 @@ int _alpm_sync_commit(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t **data)
|
||||||
_alpm_log(PM_LOG_DEBUG, _("setting main cachedir: %s"), "/tmp/");
|
_alpm_log(PM_LOG_DEBUG, _("setting main cachedir: %s"), "/tmp/");
|
||||||
maincachedir = alpm_list_getdata(cachetmp);
|
maincachedir = alpm_list_getdata(cachetmp);
|
||||||
_alpm_log(PM_LOG_WARNING, _("couldn't create package cache, using /tmp instead"));
|
_alpm_log(PM_LOG_WARNING, _("couldn't create package cache, using /tmp instead"));
|
||||||
alpm_logaction(_("warning: couldn't create package cache, using /tmp instead"));
|
alpm_logaction("warning: couldn't create package cache, using /tmp instead");
|
||||||
}
|
}
|
||||||
if(_alpm_downloadfiles(current->servers, maincachedir, files)) {
|
if(_alpm_downloadfiles(current->servers, maincachedir, files)) {
|
||||||
_alpm_log(PM_LOG_WARNING, _("failed to retrieve some files from %s\n"), current->treename);
|
_alpm_log(PM_LOG_WARNING, _("failed to retrieve some files from %s\n"), current->treename);
|
||||||
|
|
|
@ -210,7 +210,7 @@ int SYMEXPORT alpm_trans_release()
|
||||||
if(_alpm_lckrm()) {
|
if(_alpm_lckrm()) {
|
||||||
_alpm_log(PM_LOG_WARNING, _("could not remove lock file %s"),
|
_alpm_log(PM_LOG_WARNING, _("could not remove lock file %s"),
|
||||||
alpm_option_get_lockfile());
|
alpm_option_get_lockfile());
|
||||||
alpm_logaction(_("warning: could not remove lock file %s"),
|
alpm_logaction("warning: could not remove lock file %s",
|
||||||
alpm_option_get_lockfile());
|
alpm_option_get_lockfile());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -197,7 +197,7 @@ void cb_trans_evt(pmtransevt_t event, void *data1, void *data2)
|
||||||
if(config->noprogressbar) {
|
if(config->noprogressbar) {
|
||||||
printf(_("done.\n"));
|
printf(_("done.\n"));
|
||||||
}
|
}
|
||||||
snprintf(str, LOG_STR_LEN, _("installed %s (%s)"),
|
snprintf(str, LOG_STR_LEN, "installed %s (%s)",
|
||||||
alpm_pkg_get_name(data1),
|
alpm_pkg_get_name(data1),
|
||||||
alpm_pkg_get_version(data1));
|
alpm_pkg_get_version(data1));
|
||||||
alpm_logaction(str);
|
alpm_logaction(str);
|
||||||
|
@ -211,7 +211,7 @@ void cb_trans_evt(pmtransevt_t event, void *data1, void *data2)
|
||||||
if(config->noprogressbar) {
|
if(config->noprogressbar) {
|
||||||
printf(_("done.\n"));
|
printf(_("done.\n"));
|
||||||
}
|
}
|
||||||
snprintf(str, LOG_STR_LEN, _("removed %s (%s)"),
|
snprintf(str, LOG_STR_LEN, "removed %s (%s)",
|
||||||
alpm_pkg_get_name(data1),
|
alpm_pkg_get_name(data1),
|
||||||
alpm_pkg_get_version(data1));
|
alpm_pkg_get_version(data1));
|
||||||
alpm_logaction(str);
|
alpm_logaction(str);
|
||||||
|
@ -225,7 +225,7 @@ void cb_trans_evt(pmtransevt_t event, void *data1, void *data2)
|
||||||
if(config->noprogressbar) {
|
if(config->noprogressbar) {
|
||||||
printf(_("done.\n"));
|
printf(_("done.\n"));
|
||||||
}
|
}
|
||||||
snprintf(str, LOG_STR_LEN, _("upgraded %s (%s -> %s)"),
|
snprintf(str, LOG_STR_LEN, "upgraded %s (%s -> %s)",
|
||||||
(char *)alpm_pkg_get_name(data1),
|
(char *)alpm_pkg_get_name(data1),
|
||||||
(char *)alpm_pkg_get_version(data2),
|
(char *)alpm_pkg_get_version(data2),
|
||||||
(char *)alpm_pkg_get_version(data1));
|
(char *)alpm_pkg_get_version(data1));
|
||||||
|
|
|
@ -507,7 +507,7 @@ int pacman_sync(alpm_list_t *targets)
|
||||||
if(config->op_s_sync) {
|
if(config->op_s_sync) {
|
||||||
/* grab a fresh package list */
|
/* grab a fresh package list */
|
||||||
printf(_(":: Synchronizing package databases...\n"));
|
printf(_(":: Synchronizing package databases...\n"));
|
||||||
alpm_logaction(_("synchronizing package lists"));
|
alpm_logaction("synchronizing package lists");
|
||||||
if(!sync_synctree(config->op_s_sync, sync_dbs)) {
|
if(!sync_synctree(config->op_s_sync, sync_dbs)) {
|
||||||
fprintf(stderr, _("error: failed to synchronize any databases\n"));
|
fprintf(stderr, _("error: failed to synchronize any databases\n"));
|
||||||
return(1);
|
return(1);
|
||||||
|
@ -518,7 +518,7 @@ int pacman_sync(alpm_list_t *targets)
|
||||||
alpm_list_t *pkgs, *i;
|
alpm_list_t *pkgs, *i;
|
||||||
|
|
||||||
printf(_(":: Starting full system upgrade...\n"));
|
printf(_(":: Starting full system upgrade...\n"));
|
||||||
alpm_logaction(_("starting full system upgrade"));
|
alpm_logaction("starting full system upgrade");
|
||||||
if(alpm_trans_sysupgrade() == -1) {
|
if(alpm_trans_sysupgrade() == -1) {
|
||||||
fprintf(stderr, _("error: %s\n"), alpm_strerror(pm_errno));
|
fprintf(stderr, _("error: %s\n"), alpm_strerror(pm_errno));
|
||||||
retval = 1;
|
retval = 1;
|
||||||
|
|
Loading…
Add table
Reference in a new issue