xbps_find_pkg_orphans: there's no need to check pkg state, any state is ok.

This commit is contained in:
Juan RP 2012-11-19 14:07:05 +01:00
parent 556bbd495e
commit 1147e7ce3c
2 changed files with 1 additions and 12 deletions

View File

@ -56,7 +56,7 @@
*/ */
#define XBPS_PKGINDEX_VERSION "1.5" #define XBPS_PKGINDEX_VERSION "1.5"
#define XBPS_API_VERSION "20121117" #define XBPS_API_VERSION "20121119"
#ifndef XBPS_VERSION #ifndef XBPS_VERSION
#define XBPS_VERSION "UNSET" #define XBPS_VERSION "UNSET"

View File

@ -79,8 +79,6 @@ find_orphan_pkg(struct xbps_handle *xhp,
unsigned int ndep = 0, cnt = 0; unsigned int ndep = 0, cnt = 0;
bool automatic = false; bool automatic = false;
size_t i; size_t i;
int rv = 0;
pkg_state_t state;
(void)xhp; (void)xhp;
(void)loop_done; (void)loop_done;
@ -91,15 +89,6 @@ find_orphan_pkg(struct xbps_handle *xhp,
if (!automatic) if (!automatic)
return 0; 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"); reqby = prop_dictionary_get(obj, "requiredby");
if (reqby == NULL || ((cnt = prop_array_count(reqby)) == 0)) { if (reqby == NULL || ((cnt = prop_array_count(reqby)) == 0)) {
/* /*