db: unconditionally refresh index with --force

cute-signatures
Timo Teräs 2014-10-09 19:32:48 +03:00
parent 38e3f54638
commit 82713dc389
1 changed files with 3 additions and 1 deletions

View File

@ -624,7 +624,9 @@ int apk_cache_download(struct apk_database *db, struct apk_repository *repo,
r = apk_repo_format_real_url(db, repo, pkg, url, sizeof(url));
if (r < 0) return r;
if (fstatat(db->cache_fd, cacheitem, &st, 0) != 0) st.st_mtime = 0;
if ((apk_flags & APK_FORCE) ||
fstatat(db->cache_fd, cacheitem, &st, 0) != 0)
st.st_mtime = 0;
apk_message("fetch %s", url);