summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libalpm/add.c38
-rw-r--r--lib/libalpm/sync.c4
-rw-r--r--lib/libalpm/trans.c2
-rw-r--r--src/pacman/callback.c6
-rw-r--r--src/pacman/sync.c4
5 files changed, 31 insertions, 23 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());
}
diff --git a/src/pacman/callback.c b/src/pacman/callback.c
index 9c1f05d1..0e5d87ee 100644
--- a/src/pacman/callback.c
+++ b/src/pacman/callback.c
@@ -197,7 +197,7 @@ void cb_trans_evt(pmtransevt_t event, void *data1, void *data2)
if(config->noprogressbar) {
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_version(data1));
alpm_logaction(str);
@@ -211,7 +211,7 @@ void cb_trans_evt(pmtransevt_t event, void *data1, void *data2)
if(config->noprogressbar) {
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_version(data1));
alpm_logaction(str);
@@ -225,7 +225,7 @@ void cb_trans_evt(pmtransevt_t event, void *data1, void *data2)
if(config->noprogressbar) {
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_version(data2),
(char *)alpm_pkg_get_version(data1));
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index 8982b95f..d5888a57 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -507,7 +507,7 @@ int pacman_sync(alpm_list_t *targets)
if(config->op_s_sync) {
/* grab a fresh package list */
printf(_(":: Synchronizing package databases...\n"));
- alpm_logaction(_("synchronizing package lists"));
+ alpm_logaction("synchronizing package lists");
if(!sync_synctree(config->op_s_sync, sync_dbs)) {
fprintf(stderr, _("error: failed to synchronize any databases\n"));
return(1);
@@ -518,7 +518,7 @@ int pacman_sync(alpm_list_t *targets)
alpm_list_t *pkgs, *i;
printf(_(":: Starting full system upgrade...\n"));
- alpm_logaction(_("starting full system upgrade"));
+ alpm_logaction("starting full system upgrade");
if(alpm_trans_sysupgrade() == -1) {
fprintf(stderr, _("error: %s\n"), alpm_strerror(pm_errno));
retval = 1;