diff options
author | Timo Teräs <timo.teras@iki.fi> | 2012-01-12 11:33:04 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2012-01-12 11:33:04 +0200 |
commit | 30965aa86735f7d2dcd544bae0b788195c51f336 (patch) | |
tree | 028bb08c90f425796dbb5dbf1cfb89bf1a0214d0 /src/database.c | |
parent | f1de353b8162b6f41c36c01fd54599d446203a68 (diff) | |
download | apk-tools-30965aa86735f7d2dcd544bae0b788195c51f336.tar.gz apk-tools-30965aa86735f7d2dcd544bae0b788195c51f336.tar.bz2 apk-tools-30965aa86735f7d2dcd544bae0b788195c51f336.tar.xz apk-tools-30965aa86735f7d2dcd544bae0b788195c51f336.zip |
solver: print repository tag when committing package changes
Diffstat (limited to 'src/database.c')
-rw-r--r-- | src/database.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/database.c b/src/database.c index dd3f4b5..e3c10c5 100644 --- a/src/database.c +++ b/src/database.c @@ -1475,6 +1475,17 @@ int apk_db_get_tag_id(struct apk_database *db, apk_blob_t tag) return -1; } +int apk_db_get_tag_id_by_repos(struct apk_database *db, unsigned int repos) +{ + int i; + + for (i = 0; i < db->num_repo_tags; i++) { + if (db->repo_tags[i].allowed_repos & repos) + return i; + } + return -1; +} + static int fire_triggers(apk_hash_item item, void *ctx) { struct apk_database *db = (struct apk_database *) ctx; |