From 1147e7ce3c1762d63dde075f50e7d5200d8b002f Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 19 Nov 2012 14:07:05 +0100 Subject: [PATCH] xbps_find_pkg_orphans: there's no need to check pkg state, any state is ok. --- include/xbps_api.h.in | 2 +- lib/package_orphans.c | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/include/xbps_api.h.in b/include/xbps_api.h.in index f69db408..9b61a754 100644 --- a/include/xbps_api.h.in +++ b/include/xbps_api.h.in @@ -56,7 +56,7 @@ */ #define XBPS_PKGINDEX_VERSION "1.5" -#define XBPS_API_VERSION "20121117" +#define XBPS_API_VERSION "20121119" #ifndef XBPS_VERSION #define XBPS_VERSION "UNSET" diff --git a/lib/package_orphans.c b/lib/package_orphans.c index 5952031d..6f22da05 100644 --- a/lib/package_orphans.c +++ b/lib/package_orphans.c @@ -79,8 +79,6 @@ find_orphan_pkg(struct xbps_handle *xhp, unsigned int ndep = 0, cnt = 0; bool automatic = false; size_t i; - int rv = 0; - pkg_state_t state; (void)xhp; (void)loop_done; @@ -91,15 +89,6 @@ find_orphan_pkg(struct xbps_handle *xhp, if (!automatic) return 0; - if ((rv = xbps_pkg_state_dictionary(obj, &state)) != 0) - return rv; - /* - * Skip packages that aren't fully installed or half removed. - */ - if (state != XBPS_PKG_STATE_INSTALLED && - state != XBPS_PKG_STATE_HALF_REMOVED) - return 0; - reqby = prop_dictionary_get(obj, "requiredby"); if (reqby == NULL || ((cnt = prop_array_count(reqby)) == 0)) { /*