Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-07-09 00:46:29 -0400
committerDan McGee <dan@archlinux.org>2007-07-09 13:44:48 -0400
commit4906e15d0d31bf0442c25af44bcb637b87a7b027 (patch)
tree4f3d52ed788e56e0ec92a2652a85cb9281897beb /lib/libalpm
parenta2186a43a895950cf97dcfcec4b18279f09f0801 (diff)
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>
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/add.c38
-rw-r--r--lib/libalpm/sync.c4
-rw-r--r--lib/libalpm/trans.c2
3 files changed, 26 insertions, 18 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index 870d1f8c..df01cb43 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -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(alpm_list_find_str(handle->noextract, 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);
continue;
}
@@ -545,7 +545,7 @@ int _alpm_add_commit(pmtrans_t *trans, pmdb_t *db)
} else if(ret != ARCHIVE_OK) {
_alpm_log(PM_LOG_ERROR, _("could not extract %s (%s)"),
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));
errors++;
unlink(tempfile);
@@ -611,19 +611,19 @@ int _alpm_add_commit(pmtrans_t *trans, pmdb_t *db)
if(rename(filename, newpath)) {
archive_entry_set_pathname(entry, filename);
_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++;
} else {
/* copy the tempfile we extracted to the real path */
if(_alpm_copyfile(tempfile, filename)) {
archive_entry_set_pathname(entry, filename);
_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++;
} else {
archive_entry_set_pathname(entry, filename);
_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);
if(_alpm_copyfile(tempfile, newpath)) {
_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 {
_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) {
_alpm_log(PM_LOG_DEBUG, _("%s is in NoUpgrade -- skipping"), 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);
} else {
_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) {
_alpm_log(PM_LOG_ERROR, _("could not extract %s (%s)"),
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));
errors++;
continue;
@@ -761,10 +761,17 @@ int _alpm_add_commit(pmtrans_t *trans, pmdb_t *db)
if(errors) {
ret = 1;
- _alpm_log(PM_LOG_ERROR, _("errors occurred while %s %s"),
- (is_upgrade ? _("upgrading") : _("installing")), newpkg->name);
- alpm_logaction(_("errors occurred while %s %s"),
- (is_upgrade ? _("upgrading") : _("installing")), newpkg->name);
+ if(is_upgrade) {
+ _alpm_log(PM_LOG_ERROR, _("problem occurred while upgrading %s"),
+ 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)) {
_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);
}
}
@@ -817,7 +825,7 @@ int _alpm_add_commit(pmtrans_t *trans, pmdb_t *db)
if(_alpm_db_write(db, newpkg, INFRQ_ALL)) {
_alpm_log(PM_LOG_ERROR, _("could not update database entry %s-%s"),
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));
RET_ERR(PM_ERR_DB_WRITE, -1);
}
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index b04e1f49..d50d6cfa 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -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 */
_alpm_log(PM_LOG_WARNING, _("no %s cache exists, creating...\n"),
cachedir);
- alpm_logaction(_("warning: no %s cache exists, creating..."),
+ alpm_logaction("warning: no %s cache exists, creating...",
cachedir);
if(_alpm_makepath(cachedir) == 0) {
_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/");
maincachedir = alpm_list_getdata(cachetmp);
_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)) {
_alpm_log(PM_LOG_WARNING, _("failed to retrieve some files from %s\n"), current->treename);
diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c
index cde8bf0f..82f11f3d 100644
--- a/lib/libalpm/trans.c
+++ b/lib/libalpm/trans.c
@@ -210,7 +210,7 @@ int SYMEXPORT alpm_trans_release()
if(_alpm_lckrm()) {
_alpm_log(PM_LOG_WARNING, _("could not remove lock file %s"),
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());
}