summaryrefslogtreecommitdiff
path: root/src/commit.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2013-06-18 16:24:48 +0300
committerTimo Teräs <timo.teras@iki.fi>2013-06-19 08:33:51 +0300
commitd315c9019cf6e43dd7ecfe17e8d3896469396997 (patch)
tree68a54cb549792813700c18f19177bd1c2c52fe56 /src/commit.c
parentf91b01fea8a0e2b32ccf9d3eea8468d5312633c4 (diff)
downloadapk-tools-d315c9019cf6e43dd7ecfe17e8d3896469396997.tar.gz
apk-tools-d315c9019cf6e43dd7ecfe17e8d3896469396997.tar.bz2
apk-tools-d315c9019cf6e43dd7ecfe17e8d3896469396997.tar.xz
apk-tools-d315c9019cf6e43dd7ecfe17e8d3896469396997.zip
upgrade: new option: --latest (-l)
Select latest version of package (if it is not pinned), and print error if it cannot be installed due to other dependencies. Together with --available, it selects the latest package which is present at least in some repository. This also fixes few solver issues with ordering of package selection that got quite apparent with this flag. Namely, we cannot "lock" a package until it's reverse dependencies are locked or not all of the solver flags are propagated properly.
Diffstat (limited to 'src/commit.c')
-rw-r--r--src/commit.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/commit.c b/src/commit.c
index 7136627..6a2580d 100644
--- a/src/commit.c
+++ b/src/commit.c
@@ -370,13 +370,18 @@ static void print_pinning_errors(struct print_state *ps, struct apk_package *pkg
if (pkg->ipkg != NULL)
return;
- if (pkg->repos & apk_db_get_pinning_mask_repos(db, APK_DEFAULT_PINNING_MASK | BIT(tag)))
- return;
- for (i = 0; i < db->num_repo_tags; i++) {
- if (pkg->repos & db->repo_tags[i].allowed_repos) {
- label_start(ps, "masked in:");
- apk_print_indented(&ps->i, db->repo_tags[i].tag);
+ if (!(pkg->repos & db->available_repos)) {
+ label_start(ps, "masked in:");
+ apk_print_indented_fmt(&ps->i, "--no-network");
+ } else {
+ if (pkg->repos & apk_db_get_pinning_mask_repos(db, APK_DEFAULT_PINNING_MASK | BIT(tag)))
+ return;
+ for (i = 0; i < db->num_repo_tags; i++) {
+ if (pkg->repos & db->repo_tags[i].allowed_repos) {
+ label_start(ps, "masked in:");
+ apk_print_indented(&ps->i, db->repo_tags[i].tag);
+ }
}
}
label_end(ps);