From e706f63eda1f62314f25987ab52e35f91f29dd78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Tue, 15 Jun 2010 18:31:45 +0300 Subject: state: handle properly packages which are installed Installed package does not need to be checked for availability. Account for packages missing if they get pruned out due to installability check. --- src/state.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/state.c b/src/state.c index 7c758cc..59315eb 100644 --- a/src/state.c +++ b/src/state.c @@ -178,6 +178,8 @@ static void ns_free(apk_name_state_t name) static inline int apk_state_pkg_available(struct apk_state *state, struct apk_package *pkg) { + if (pkg->ipkg != NULL) + return TRUE; if (pkg->installed_size == 0) return TRUE; if (pkg->filename != NULL) @@ -316,6 +318,7 @@ int apk_state_prune_dependency(struct apk_state *state, if (c->num <= 1) { name_choices_unref(c); state->name[name->id] = ns_from_pkg(NULL); + *apk_name_array_add(&state->missing) = name; return -1; } -- cgit v1.2.3