lib/transaction_files.c: collect file installs/removals to correctly find obsoletes

This commit is contained in:
Duncaen
2019-06-16 17:38:38 +02:00
committed by Duncan Overbruck
parent 91e428d54d
commit 29f1433afd
6 changed files with 474 additions and 0 deletions

View File

@ -255,6 +255,16 @@ xbps_transaction_commit(struct xbps_handle *xhp)
"%s\n", strerror(rv));
goto out;
}
/*
* Collect files in the transaction and find some issues
* like multiple packages installing the same file.
*/
xbps_set_cb_state(xhp, XBPS_STATE_TRANS_FILES, 0, NULL, NULL);
if ((rv = xbps_transaction_files(xhp, iter)) != 0) {
xbps_dbg_printf(xhp, "[trans] failed to verify transaction files: "
"%s\n", strerror(rv));
goto out;
}
/*
* Install, update, configure or remove packages as specified
* in the transaction dictionary.