xbps-install: abort transaction if there's insufficient disk space on rootdir.

The free disk space wasn't computed correctly and xbps-install(8) wasn't
handling ENOSPC rval in xbps_transaction_prepare().
This commit is contained in:
Juan RP
2014-09-18 12:11:02 +02:00
parent 20326738ed
commit f52eea34d4
3 changed files with 7 additions and 1 deletions

View File

@@ -322,6 +322,9 @@ exec_transaction(struct xbps_handle *xhp, int maxcols, bool yes, bool drun)
array = xbps_dictionary_get(xhp->transd, "conflicts");
print_array(array);
fprintf(stderr, "Transaction aborted due to conflicting packages.\n");
} else if (rv == ENOSPC) {
/* not enough free space */
fprintf(stderr, "Transaction aborted due to insufficient disk space.\n");
} else {
xbps_dbg_printf(xhp, "Empty transaction dictionary: %s\n",
strerror(errno));