db: removed apk_repository_update_all() as its no longer needed
We use APK_UPDATE_CACHE apk_flag instead.cute-signatures
parent
d931f9fe5c
commit
fa47cadb98
|
@ -140,8 +140,6 @@ int apk_db_index_write(struct apk_database *db, struct apk_ostream *os);
|
|||
|
||||
int apk_db_add_repository(apk_database_t db, apk_blob_t repository);
|
||||
int apk_repository_update(struct apk_database *db, struct apk_repository *repo);
|
||||
int apk_repository_update_all(struct apk_database *db);
|
||||
|
||||
int apk_cache_download(struct apk_database *db, csum_t csum,
|
||||
const char *url, const char *item);
|
||||
int apk_cache_exists(struct apk_database *db, csum_t csum, const char *item);
|
||||
|
|
|
@ -1009,17 +1009,6 @@ int apk_repository_update(struct apk_database *db, struct apk_repository *repo)
|
|||
return apk_cache_download(db, repo->url_csum, repo->url, apk_index_gz);
|
||||
}
|
||||
|
||||
int apk_repository_update_all(struct apk_database *db)
|
||||
{
|
||||
int i, ret;
|
||||
for (i = 0; i < db->num_repos; i++) {
|
||||
ret = apk_repository_update(db, &db->repos[i]);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int apk_db_add_repository(apk_database_t _db, apk_blob_t repository)
|
||||
{
|
||||
struct apk_database *db = _db.db;
|
||||
|
|
|
@ -19,10 +19,9 @@ static int update_main(void *ctx, int argc, char **argv)
|
|||
{
|
||||
struct apk_database db;
|
||||
|
||||
apk_flags |= APK_UPDATE_CACHE;
|
||||
if (apk_db_open(&db, apk_root, APK_OPENF_READ) < 0)
|
||||
return -1;
|
||||
|
||||
apk_repository_update_all(&db);
|
||||
apk_db_close(&db);
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue