diff options
author | Timo Teräs <timo.teras@iki.fi> | 2012-01-17 14:46:39 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2012-01-17 14:48:22 +0200 |
commit | b3df78ed03b3739d01220f9bf2f00ab8df61425f (patch) | |
tree | 3e06ec9de1b517fba8bdee5c3a234193e0a775b9 /src/add.c | |
parent | eaaba3ee893c7fb3c5a258f0609d8ab6e4637804 (diff) | |
download | apk-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/add.c')
-rw-r--r-- | src/add.c | 7 |
1 files changed, 0 insertions, 7 deletions
@@ -107,7 +107,6 @@ static int add_main(void *ctx, struct apk_database *db, int argc, char **argv) } apk_dep_from_pkg(&dep, db, pkg); } else { - struct apk_repository_tag *tag; apk_blob_t b = APK_BLOB_STR(argv[i]); apk_blob_pull_dep(&b, db, &dep); @@ -116,12 +115,6 @@ static int add_main(void *ctx, struct apk_database *db, int argc, char **argv) argv[i]); return -1; } - tag = &db->repo_tags[dep.repository_tag]; - if (!tag->allowed_repos) { - apk_error("Repository tag '" BLOB_FMT "' is not defined", - BLOB_PRINTF(*tag->name)); - return -1; - } } if (virtpkg == NULL) { |