summaryrefslogtreecommitdiff
path: root/src/state.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2011-01-03 21:06:41 +0200
committerTimo Teräs <timo.teras@iki.fi>2011-01-03 21:06:41 +0200
commitd8ba07e484b0c838ce475202f03e041953b183e1 (patch)
treeeffae9887b80d12591e2f05f29ac95f094671dc7 /src/state.c
parent1f42cc1aed32ebf160db5e812d2f57e654042522 (diff)
downloadapk-tools-d8ba07e484b0c838ce475202f03e041953b183e1.tar.gz
apk-tools-d8ba07e484b0c838ce475202f03e041953b183e1.tar.bz2
apk-tools-d8ba07e484b0c838ce475202f03e041953b183e1.tar.xz
apk-tools-d8ba07e484b0c838ce475202f03e041953b183e1.zip
pkg, db: allow index with unsupported features to be loaded
Just disable installation of packages using the new stuff. Also flag lower case package info fields as non-critical and allow installation even if that features is not supported.
Diffstat (limited to 'src/state.c')
-rw-r--r--src/state.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/state.c b/src/state.c
index 408df72..4a4641d 100644
--- a/src/state.c
+++ b/src/state.c
@@ -119,6 +119,15 @@ static struct apk_name_choices *name_choices_new(struct apk_database *db,
memcpy(nc->pkgs, name->pkgs->item,
name->pkgs->num * sizeof(struct apk_package *));
+ for (j = 0; j < nc->num; ) {
+ if (nc->pkgs[j]->filename != APK_PKG_UNINSTALLABLE) {
+ j++;
+ } else {
+ nc->pkgs[j] = nc->pkgs[nc->num - 1];
+ nc->num--;
+ }
+ }
+
if (name->flags & APK_NAME_TOPLEVEL_OVERRIDE)
return nc;
@@ -131,7 +140,7 @@ static struct apk_name_choices *name_choices_new(struct apk_database *db,
for (j = 0; j < nc->num; ) {
if (apk_dep_is_satisfied(dep, nc->pkgs[j])) {
- j++;
+ j++;
} else {
nc->pkgs[j] = nc->pkgs[nc->num - 1];
nc->num--;