diff options
author | Allan McRae <allan@archlinux.org> | 2010-11-16 08:07:43 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2010-12-13 03:30:11 +0100 |
commit | 24684a616ed46c635a2236873c8168b9153b5bc1 (patch) | |
tree | 8b8111aeec5b01e144187ae1c0a76297734c2a6d /src | |
parent | e22aa23c8f5adb0fd4b7ccbee480a4906ede0346 (diff) | |
download | pacman-24684a616ed46c635a2236873c8168b9153b5bc1.tar.gz pacman-24684a616ed46c635a2236873c8168b9153b5bc1.tar.xz |
Display progress bar for disk space checking
Checking disk space needed for a transaction can take a while so add
an informative progress bar.
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/pacman/callback.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/pacman/callback.c b/src/pacman/callback.c index 925f1fcf..f585b284 100644 --- a/src/pacman/callback.c +++ b/src/pacman/callback.c @@ -228,6 +228,11 @@ void cb_trans_evt(pmtransevt_t event, void *data1, void *data2) case PM_TRANS_EVT_RETRIEVE_START: printf(_(":: Retrieving packages from %s...\n"), (char*)data1); break; + case PM_TRANS_EVT_DISKSPACE_START: + if(config->noprogressbar) { + printf(_("checking available disk space...\n")); + } + break; /* all the simple done events, with fallthrough for each */ case PM_TRANS_EVT_FILECONFLICTS_DONE: case PM_TRANS_EVT_CHECKDEPS_DONE: @@ -236,6 +241,7 @@ void cb_trans_evt(pmtransevt_t event, void *data1, void *data2) case PM_TRANS_EVT_INTEGRITY_DONE: case PM_TRANS_EVT_DELTA_INTEGRITY_DONE: case PM_TRANS_EVT_DELTA_PATCHES_DONE: + case PM_TRANS_EVT_DISKSPACE_DONE: /* nothing */ break; } @@ -375,6 +381,9 @@ void cb_trans_progress(pmtransprog_t event, const char *pkgname, int percent, case PM_TRANS_PROGRESS_CONFLICTS_START: opr = _("checking for file conflicts"); break; + case PM_TRANS_PROGRESS_DISKSPACE_START: + opr = _("checking available disk space"); + break; default: return; } |