summaryrefslogtreecommitdiff
path: root/src/database.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/database.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/database.c')
-rw-r--r--src/database.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/database.c b/src/database.c
index 0c62b4d..dd3f4b5 100644
--- a/src/database.c
+++ b/src/database.c
@@ -1135,7 +1135,7 @@ int apk_db_open(struct apk_database *db, struct apk_db_options *dbopts)
struct apk_bstream *bs;
struct statfs stfs;
apk_blob_t blob;
- int r, fd, rr = 0;
+ int i, r, fd, rr = 0;
memset(db, 0, sizeof(*db));
if (apk_flags & APK_SIMULATE) {
@@ -1312,6 +1312,14 @@ int apk_db_open(struct apk_database *db, struct apk_db_options *dbopts)
goto ret_r;
}
+ for (i = 0; i < db->num_repo_tags; i++) {
+ if (!db->repo_tags[i].allowed_repos) {
+ apk_warning("Repository tag '" BLOB_FMT "' used in world is no longer available",
+ BLOB_PRINTF(*db->repo_tags[i].name));
+ db->missing_tags = 1;
+ }
+ }
+
if (db->compat_newfeatures) {
apk_warning("This apk-tools is OLD! Some packages %s.",
db->compat_notinstallable ?