From b3df78ed03b3739d01220f9bf2f00ab8df61425f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Tue, 17 Jan 2012 14:46:39 +0200 Subject: 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 --- src/upgrade.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/upgrade.c') diff --git a/src/upgrade.c b/src/upgrade.c index 6ce851b19b..497fc54bd9 100644 --- a/src/upgrade.c +++ b/src/upgrade.c @@ -97,6 +97,11 @@ static int upgrade_main(void *ctx, struct apk_database *db, int argc, char **arg struct apk_dependency_array *world = NULL; int i, r; + if (apk_db_check_world(db, db->world) != 0) { + apk_error("Not continuing with upgrade due to missing repository tags. Use --force to override."); + return -1; + } + solver_flags = APK_SOLVERF_UPGRADE | uctx->solver_flags; if (!uctx->no_self_upgrade) { r = apk_do_self_upgrade(db, solver_flags); -- cgit v1.2.3