From d8ba07e484b0c838ce475202f03e041953b183e1 Mon Sep 17 00:00:00 2001 From: Timo Teräs Date: Mon, 3 Jan 2011 21:06:41 +0200 Subject: 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. --- src/state.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/state.c') 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--; -- cgit v1.2.3-60-g2f50