aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/commit.c3
-rw-r--r--src/solver.c7
2 files changed, 7 insertions, 3 deletions
diff --git a/src/commit.c b/src/commit.c
index 6130f36..42280aa 100644
--- a/src/commit.c
+++ b/src/commit.c
@@ -425,6 +425,9 @@ static void print_pinning_errors(struct print_state *ps, struct apk_package *pkg
if (!(pkg->repos & db->available_repos)) {
label_start(ps, "masked in:");
apk_print_indented_fmt(&ps->i, "--no-network");
+ } else if (!(BIT(pkg->layer) & db->active_layers)) {
+ label_start(ps, "masked in:");
+ apk_print_indented_fmt(&ps->i, "layer");
} else if (pkg->repos == BIT(APK_REPOSITORY_CACHED) && !pkg->filename) {
label_start(ps, "masked in:");
apk_print_indented_fmt(&ps->i, "cache");
diff --git a/src/solver.c b/src/solver.c
index 3283659..fc73642 100644
--- a/src/solver.c
+++ b/src/solver.c
@@ -198,9 +198,10 @@ static void discover_name(struct apk_solver_state *ss, struct apk_name *name)
/* Package is in 'cached' repository if filename is provided,
* 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;
+ (BIT(pkg->layer) & db->active_layers) &&
+ ((pkg->repos & db->available_repos) ||
+ pkg->cached_non_repository ||
+ pkg->ipkg);
/* Prune install_if packages that are no longer available,
* currently works only if SOLVERF_AVAILABLE is set in the