Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/sync.c
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2010-11-16 17:07:43 +1000
committerDan McGee <dan@archlinux.org>2010-12-12 20:30:11 -0600
commit24684a616ed46c635a2236873c8168b9153b5bc1 (patch)
tree8b8111aeec5b01e144187ae1c0a76297734c2a6d /lib/libalpm/sync.c
parente22aa23c8f5adb0fd4b7ccbee480a4906ede0346 (diff)
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 'lib/libalpm/sync.c')
-rw-r--r--lib/libalpm/sync.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index 14f14621..8af32e45 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -999,11 +999,15 @@ int _alpm_sync_commit(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t **data)
/* check available disk space */
if(handle->checkspace) {
+ EVENT(trans, PM_TRANS_EVT_DISKSPACE_START, NULL, NULL);
+
_alpm_log(PM_LOG_DEBUG, "checking available disk space\n");
if(_alpm_check_diskspace(trans, handle->db_local) == -1) {
_alpm_log(PM_LOG_ERROR, _("not enough free disk space\n"));
goto error;
}
+
+ EVENT(trans, PM_TRANS_EVT_DISKSPACE_DONE, NULL, NULL);
}
/* remove conflicting and to-be-replaced packages */