From 894cb13b595ae940f69be55bcf060da7df624e96 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 5 Feb 2009 17:38:31 +0100 Subject: [PATCH] Simplify xbps_install_binary_pkg_from_repolist(). --HG-- extra : convert_revision : 9d4960502c05130a97459e41f66b4b19ec0acbc2 --- lib/install.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/lib/install.c b/lib/install.c index 62f9b4ff619..6ece76d7c75 100644 --- a/lib/install.c +++ b/lib/install.c @@ -79,17 +79,7 @@ xbps_install_binary_pkg_from_repolist(prop_object_t obj, void *arg, */ if (!xbps_pkg_has_rundeps(pkgrd)) { /* pkg has no deps, just install it. */ - rv = xbps_unpack_binary_pkg(repod, pkgrd, - xbps_unpack_archive_cb); - if (rv == 0) { - rv = xbps_register_pkg(pkgname, version, desc); - if (rv == EEXIST) - rv = 0; - } - free(plist); - prop_object_release(repod); - *loop_done = true; - return rv; + goto install; } /* @@ -101,6 +91,8 @@ xbps_install_binary_pkg_from_repolist(prop_object_t obj, void *arg, prop_object_release(repod); return rv; } + +install: /* * Finally install the package, now that all * required dependencies were installed.