When finding package orphans, only report those with "installed" state.
--HG-- extra : convert_revision : xtraeme%40gmail.com-20090822054123-1bud3ldgin5opbhc
This commit is contained in:
parent
59b1942617
commit
14c9886cfc
@ -50,6 +50,8 @@ find_orphan_pkg(prop_object_t obj, void *arg, bool *loop_done)
|
|||||||
char *pkgname;
|
char *pkgname;
|
||||||
unsigned int ndep = 0, cnt = 0;
|
unsigned int ndep = 0, cnt = 0;
|
||||||
bool automatic = false;
|
bool automatic = false;
|
||||||
|
pkg_state_t state = 0;
|
||||||
|
int rv = 0;
|
||||||
|
|
||||||
(void)arg;
|
(void)arg;
|
||||||
(void)loop_done;
|
(void)loop_done;
|
||||||
@ -60,6 +62,12 @@ find_orphan_pkg(prop_object_t obj, void *arg, bool *loop_done)
|
|||||||
if (!automatic)
|
if (!automatic)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
if ((rv = xbps_get_pkg_state_dictionary(obj, &state)) != 0)
|
||||||
|
return rv;
|
||||||
|
|
||||||
|
if (state != XBPS_PKG_STATE_INSTALLED)
|
||||||
|
return 0;
|
||||||
|
|
||||||
reqby = prop_dictionary_get(obj, "requiredby");
|
reqby = prop_dictionary_get(obj, "requiredby");
|
||||||
if (reqby == NULL)
|
if (reqby == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user