diff options
author | Timo Teräs <timo.teras@iki.fi> | 2012-01-17 10:53:35 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2012-01-17 10:53:35 +0200 |
commit | 60ee61162053054bb4abe7e0260734fd53532401 (patch) | |
tree | 73f76ab9f5575f703c5cec58bf73f4b7254218ea /src | |
parent | fc57b7310174cb0ef31df7f22b7df1f588cdc694 (diff) | |
download | apk-tools-60ee61162053054bb4abe7e0260734fd53532401.tar.gz apk-tools-60ee61162053054bb4abe7e0260734fd53532401.tar.bz2 apk-tools-60ee61162053054bb4abe7e0260734fd53532401.tar.xz apk-tools-60ee61162053054bb4abe7e0260734fd53532401.zip |
db: print dependencies referring to missing tags instead of tags
Diffstat (limited to 'src')
-rw-r--r-- | src/database.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/database.c b/src/database.c index 4101152..34edf68 100644 --- a/src/database.c +++ b/src/database.c @@ -1316,12 +1316,17 @@ int apk_db_open(struct apk_database *db, struct apk_db_options *dbopts) } /* repository id 0 is the no-tag repo */ - for (i = 1; i < db->num_repo_tags; i++) { - if (!db->repo_tags[i].allowed_repos) { - apk_warning("Repository tag (%d) '" BLOB_FMT "' used in world is no longer available", - i, BLOB_PRINTF(*db->repo_tags[i].name)); - db->missing_tags = 1; - } + for (i = 0; i < db->world->num; i++) { + struct apk_dependency *dep = &db->world->item[i]; + int tag = dep->repository_tag; + + if (tag == 0 || db->repo_tags[tag].allowed_repos != 0) + continue; + + apk_warning("The repository tag for world dependency '%s@" BLOB_FMT "' does not exist", + dep->name->name, + BLOB_PRINTF(*db->repo_tags[tag].name)); + db->missing_tags = 1; } if (db->compat_newfeatures) { |