summaryrefslogtreecommitdiff
path: root/src/solver.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2014-05-19 11:50:10 +0300
committerTimo Teräs <timo.teras@iki.fi>2014-05-19 11:50:10 +0300
commit1dc70477b5e9b07808001093ec33d2530d1799e1 (patch)
treec725ea0196c7a4834da5fa73d164bd96acc3eeee /src/solver.c
parent7e64edfad62da8e180f660820bfa7a2fc321a72a (diff)
downloadapk-tools-1dc70477b5e9b07808001093ec33d2530d1799e1.tar.gz
apk-tools-1dc70477b5e9b07808001093ec33d2530d1799e1.tar.bz2
apk-tools-1dc70477b5e9b07808001093ec33d2530d1799e1.tar.xz
apk-tools-1dc70477b5e9b07808001093ec33d2530d1799e1.zip
solver: fix installation of non-repository packages during tmpfs boot
allow packages in the cache's installed to be selected for installation by the solver. add test case for the issue.
Diffstat (limited to 'src/solver.c')
-rw-r--r--src/solver.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/solver.c b/src/solver.c
index 2b35924..59edb1c 100644
--- a/src/solver.c
+++ b/src/solver.c
@@ -197,6 +197,7 @@ static void discover_name(struct apk_solver_state *ss, struct apk_name *name)
* or it's a 'virtual' package with install_size zero */
pkg->ss.pkg_selectable =
(pkg->repos & db->available_repos) ||
+ pkg->cached_non_repository ||
pkg->ipkg;
/* Prune install_if packages that are no longer available,
@@ -212,8 +213,11 @@ static void discover_name(struct apk_solver_state *ss, struct apk_name *name)
pkg->ss.tag_preferred =
(pkg->filename != NULL) ||
(pkg->installed_size == 0) ||
- !!(repos & ss->default_repos);
- pkg->ss.tag_ok = pkg->ss.tag_preferred || pkg->ipkg;
+ (repos & ss->default_repos);
+ pkg->ss.tag_ok =
+ pkg->ss.tag_preferred ||
+ pkg->cached_non_repository ||
+ pkg->ipkg;
foreach_array_item(dep, pkg->depends) {
discover_name(ss, dep->name);