From 2eb7331907a2f9ef519f9a78bac29156062c9530 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Fri, 25 Feb 2011 12:27:42 +0100 Subject: [PATCH] xbps-bin: return 1 if there are missing deps, return errno in other errors. --- bin/xbps-bin/install.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/xbps-bin/install.c b/bin/xbps-bin/install.c index b5168163..d1b298a7 100644 --- a/bin/xbps-bin/install.c +++ b/bin/xbps-bin/install.c @@ -585,7 +585,7 @@ xbps_exec_transaction(bool yes, bool show_download_pkglist_url) trans = calloc(1, sizeof(struct transaction)); if (trans == NULL) - return rv; + return errno; trans->dict = xbps_transaction_prepare(); if (trans->dict == NULL) { @@ -593,8 +593,10 @@ xbps_exec_transaction(bool yes, bool show_download_pkglist_url) /* missing packages */ array = xbps_transaction_missingdeps_get(); show_missing_deps(array); + rv = 1; goto out; } + rv = errno; xbps_dbg_printf("Empty transaction dictionary: %s\n", strerror(errno)); 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"); if (trans->iter == NULL) { + rv = errno; xbps_error_printf("xbps-bin: error allocating array mem! (%s)\n", strerror(errno)); goto out;