summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2010-06-15 18:31:45 +0300
committerTimo Teräs <timo.teras@iki.fi>2010-06-15 18:31:45 +0300
commite706f63eda1f62314f25987ab52e35f91f29dd78 (patch)
tree61139136238b509b1a937c7cf9259af541e6f660
parent7ae592a4fabc2454259bda9a52a2fa6c95a8ff7e (diff)
downloadapk-tools-e706f63eda1f62314f25987ab52e35f91f29dd78.tar.gz
apk-tools-e706f63eda1f62314f25987ab52e35f91f29dd78.tar.bz2
apk-tools-e706f63eda1f62314f25987ab52e35f91f29dd78.tar.xz
apk-tools-e706f63eda1f62314f25987ab52e35f91f29dd78.zip
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.
-rw-r--r--src/state.c3
1 files changed, 3 insertions, 0 deletions
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;
}