xbps_transaction_prepare: fix for XBPS_FLAG_DOWNLOAD_ONLY.

We don't really care if all pkgs are on hold, so modify
logic to avoid this part and exit early.
This commit is contained in:
Juan RP 2020-02-18 09:07:03 +01:00
parent 1b9dc3cc4d
commit 4d6d328c62
No known key found for this signature in database
GPG Key ID: AF19F6CB482F9368

View File

@ -327,6 +327,13 @@ xbps_transaction_prepare(struct xbps_handle *xhp)
}
xbps_object_release(edges);
/*
* Do not perform any checks if XBPS_FLAG_DOWNLOAD_ONLY
* is set. We just need to download the archives (dependencies).
*/
if (xhp->flags & XBPS_FLAG_DOWNLOAD_ONLY)
goto out;
/*
* If all pkgs in transaction are on hold, no need to check
* for anything else.
@ -345,13 +352,6 @@ xbps_transaction_prepare(struct xbps_handle *xhp)
if (all_on_hold)
goto out;
/*
* Do not perform any checks if XBPS_FLAG_DOWNLOAD_ONLY
* is set. We just need to download the archives (dependencies).
*/
if (xhp->flags & XBPS_FLAG_DOWNLOAD_ONLY)
goto out;
/*
* Check for packages to be replaced.
*/