summaryrefslogtreecommitdiff
path: root/src/solver.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2012-01-12 10:42:27 +0200
committerTimo Teräs <timo.teras@iki.fi>2012-01-12 10:42:27 +0200
commitf1de353b8162b6f41c36c01fd54599d446203a68 (patch)
treecd1d39497fc8c7f73f308c27be009b59068cd671 /src/solver.c
parent2372692660c80e79f1161f6ea99dd5eeea60a6d4 (diff)
downloadapk-tools-f1de353b8162b6f41c36c01fd54599d446203a68.tar.gz
apk-tools-f1de353b8162b6f41c36c01fd54599d446203a68.tar.bz2
apk-tools-f1de353b8162b6f41c36c01fd54599d446203a68.tar.xz
apk-tools-f1de353b8162b6f41c36c01fd54599d446203a68.zip
db, solver: refuse committing changes if there is missing tags
Diffstat (limited to 'src/solver.c')
-rw-r--r--src/solver.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/solver.c b/src/solver.c
index 965694b..1ebadcc 100644
--- a/src/solver.c
+++ b/src/solver.c
@@ -1261,6 +1261,11 @@ 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)) {
+ apk_error("Not committing changes due to missing repository tags. Use --force to override.");
+ return -1;
+ }
+
if (changeset->changes == NULL)
goto all_done;
@@ -1406,6 +1411,11 @@ int apk_solver_commit(struct apk_database *db,
struct apk_package_array *solution = NULL;
int r;
+ if (db->missing_tags && !(apk_flags & APK_FORCE)) {
+ apk_error("Not committing changes due to missing repository tags. Use --force to override.");
+ return -1;
+ }
+
r = apk_solver_solve(db, solver_flags,
world, &solution, &changeset);
if (r < 0)