diff options
author | Simon Gomizelj <simongmzlj@gmail.com> | 2013-03-07 01:32:41 -0500 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2013-03-10 09:01:56 +1000 |
commit | ce9fd69eba44d997a660c982a8149fae7acb6a29 (patch) | |
tree | df011f59761e8a9352e323c184ed14be23b612ff /src | |
parent | 9876d9783979ec031d673e9a6df845e52fd2febb (diff) |
make status/log messages reflect version change
Currently pacman either prints 'adding' or 'upgrading' when installing
a package. This make pacman print and log the other possible actions:
'downgrade' and 'reinstall'
Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/pacman/callback.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/pacman/callback.c b/src/pacman/callback.c index d0887cb7..71d9d04d 100644 --- a/src/pacman/callback.c +++ b/src/pacman/callback.c @@ -207,6 +207,30 @@ void cb_event(alpm_event_t event, void *data1, void *data2) alpm_pkg_get_version(data1)); display_new_optdepends(data2, data1); break; + case ALPM_EVENT_DOWNGRADE_START: + if(config->noprogressbar) { + printf(_("downgrading %s...\n"), alpm_pkg_get_name(data1)); + } + break; + case ALPM_EVENT_DOWNGRADE_DONE: + alpm_logaction(config->handle, PACMAN_CALLER_PREFIX, + "downgraded %s (%s -> %s)\n", + alpm_pkg_get_name(data1), + alpm_pkg_get_version(data2), + alpm_pkg_get_version(data1)); + display_new_optdepends(data2, data1); + break; + case ALPM_EVENT_REINSTALL_START: + if(config->noprogressbar) { + printf(_("reinstalling %s...\n"), alpm_pkg_get_name(data1)); + } + break; + case ALPM_EVENT_REINSTALL_DONE: + alpm_logaction(config->handle, PACMAN_CALLER_PREFIX, + "reinstalled %s (%s)\n", + alpm_pkg_get_name(data1), + alpm_pkg_get_version(data1)); + break; case ALPM_EVENT_INTEGRITY_START: if(config->noprogressbar) { printf(_("checking package integrity...\n")); @@ -444,6 +468,12 @@ void cb_progress(alpm_progress_t event, const char *pkgname, int percent, case ALPM_PROGRESS_UPGRADE_START: opr = _("upgrading"); break; + case ALPM_PROGRESS_DOWNGRADE_START: + opr = _("downgrading"); + break; + case ALPM_PROGRESS_REINSTALL_START: + opr = _("reinstalling"); + break; case ALPM_PROGRESS_REMOVE_START: opr = _("removing"); break; |