xbps-bin: return 1 if there are missing deps, return errno in other errors.
This commit is contained in:
parent
0435772097
commit
2eb7331907
@ -585,7 +585,7 @@ xbps_exec_transaction(bool yes, bool show_download_pkglist_url)
|
|||||||
|
|
||||||
trans = calloc(1, sizeof(struct transaction));
|
trans = calloc(1, sizeof(struct transaction));
|
||||||
if (trans == NULL)
|
if (trans == NULL)
|
||||||
return rv;
|
return errno;
|
||||||
|
|
||||||
trans->dict = xbps_transaction_prepare();
|
trans->dict = xbps_transaction_prepare();
|
||||||
if (trans->dict == NULL) {
|
if (trans->dict == NULL) {
|
||||||
@ -593,8 +593,10 @@ xbps_exec_transaction(bool yes, bool show_download_pkglist_url)
|
|||||||
/* missing packages */
|
/* missing packages */
|
||||||
array = xbps_transaction_missingdeps_get();
|
array = xbps_transaction_missingdeps_get();
|
||||||
show_missing_deps(array);
|
show_missing_deps(array);
|
||||||
|
rv = 1;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
rv = errno;
|
||||||
xbps_dbg_printf("Empty transaction dictionary: %s\n",
|
xbps_dbg_printf("Empty transaction dictionary: %s\n",
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
goto out;
|
goto out;
|
||||||
@ -607,6 +609,7 @@ xbps_exec_transaction(bool yes, bool show_download_pkglist_url)
|
|||||||
*/
|
*/
|
||||||
trans->iter = xbps_get_array_iter_from_dict(trans->dict, "packages");
|
trans->iter = xbps_get_array_iter_from_dict(trans->dict, "packages");
|
||||||
if (trans->iter == NULL) {
|
if (trans->iter == NULL) {
|
||||||
|
rv = errno;
|
||||||
xbps_error_printf("xbps-bin: error allocating array mem! (%s)\n",
|
xbps_error_printf("xbps-bin: error allocating array mem! (%s)\n",
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
goto out;
|
goto out;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user