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 16:54:30 +1000
committerDan McGee <dan@archlinux.org>2010-12-12 20:30:05 -0600
commite22aa23c8f5adb0fd4b7ccbee480a4906ede0346 (patch)
treef55fd3e631e186c914b358930e3e30b29cdb69cb /lib/libalpm/sync.c
parent3f0d98c124db1547d6595762bd2d125b4350b861 (diff)
Add configuration option to control disk space checking
Disk space checking is likely to be an unnecessary bottleneck to people with reasonable partition sizes so add a configuration option to allow it to be disabled/enabled as wanted. 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.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index 23476b8d..14f14621 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -998,10 +998,12 @@ int _alpm_sync_commit(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t **data)
}
/* check available disk space */
- _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;
+ if(handle->checkspace) {
+ _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;
+ }
}
/* remove conflicting and to-be-replaced packages */