summaryrefslogtreecommitdiff
path: root/src/solver.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2012-01-17 14:46:39 +0200
committerTimo Teräs <timo.teras@iki.fi>2012-01-17 14:48:22 +0200
commitb3df78ed03b3739d01220f9bf2f00ab8df61425f (patch)
tree3e06ec9de1b517fba8bdee5c3a234193e0a775b9 /src/solver.c
parenteaaba3ee893c7fb3c5a258f0609d8ab6e4637804 (diff)
downloadapk-tools-b3df78ed03b3739d01220f9bf2f00ab8df61425f.tar.gz
apk-tools-b3df78ed03b3739d01220f9bf2f00ab8df61425f.tar.bz2
apk-tools-b3df78ed03b3739d01220f9bf2f00ab8df61425f.tar.xz
apk-tools-b3df78ed03b3739d01220f9bf2f00ab8df61425f.zip
solver, upgrade: properly detect missing repository tags
* upgrade needs explicit check so we don't try self-upgrade (which would print additional messages on screen) * add can fix problems, so check against the new world * merge the code in few places
Diffstat (limited to 'src/solver.c')
-rw-r--r--src/solver.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/solver.c b/src/solver.c
index 959e56f..76edeba 100644
--- a/src/solver.c
+++ b/src/solver.c
@@ -1328,7 +1328,7 @@ int apk_solver_commit_changeset(struct apk_database *db,
struct apk_change *change;
int i, r = 0, size_diff = 0;
- if (db->missing_tags && !(apk_flags & APK_FORCE)) {
+ if (apk_db_check_world(db, world) != 0) {
apk_error("Not committing changes due to missing repository tags. Use --force to override.");
return -1;
}
@@ -1478,7 +1478,7 @@ int apk_solver_commit(struct apk_database *db,
struct apk_package_array *solution = NULL;
int r;
- if (db->missing_tags && !(apk_flags & APK_FORCE)) {
+ if (apk_db_check_world(db, world) != 0) {
apk_error("Not committing changes due to missing repository tags. Use --force to override.");
return -1;
}