xbps_transaction_prepare: check for unresolved shlibs a bit early.

It's just better if we check for unresolved shlibs earlier because
the transaction array will be smaller if there are replaced packages.
This commit is contained in:
Juan RP 2014-11-13 11:39:20 +01:00
parent 805cabc1c4
commit 74c30556fc

View File

@ -315,6 +315,12 @@ xbps_transaction_prepare(struct xbps_handle *xhp)
array = xbps_dictionary_get(xhp->transd, "conflicts");
if (xbps_array_count(array))
return EAGAIN;
/*
* Check for unresolved shared libraries.
*/
if (xbps_transaction_shlibs(xhp, pkgs,
xbps_dictionary_get(xhp->transd, "missing_shlibs")))
return ENOEXEC;
/*
* Check for packages to be replaced.
*/
@ -323,12 +329,6 @@ xbps_transaction_prepare(struct xbps_handle *xhp)
xhp->transd = NULL;
return rv;
}
/*
* Check for unresolved shared libraries.
*/
if (xbps_transaction_shlibs(xhp, pkgs, xbps_dictionary_get(xhp->transd, "missing_shlibs")))
return ENOEXEC;
/*
* Add transaction stats for total download/installed size,
* number of packages to be installed, updated, configured