summaryrefslogtreecommitdiff
path: root/src/app_cache.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2021-11-15 13:35:59 +0200
committerTimo Teräs <timo.teras@iki.fi>2021-12-14 20:58:02 +0200
commit74f67ab81c646b9c1fb1136776cf05a949de2526 (patch)
tree690373e31faacc5d0a56dc40f49c4fbb9c44a137 /src/app_cache.c
parent5eb7f989c0d901d9f10c03dee184abda1eaaf130 (diff)
downloadapk-tools-74f67ab81c646b9c1fb1136776cf05a949de2526.tar.gz
apk-tools-74f67ab81c646b9c1fb1136776cf05a949de2526.tar.bz2
apk-tools-74f67ab81c646b9c1fb1136776cf05a949de2526.tar.xz
apk-tools-74f67ab81c646b9c1fb1136776cf05a949de2526.zip
fix fetching of depdencies only packages
Remove the APK_REPOSITORY_CACHED bit from dependencies only packages (that is, installed_size == 0). For fetch, the problem is that apk_db_select_repo() would return the cache repository, but the package would not be there. Update also the locations needed to handle these packages correctly without the cached repository bit being set.
Diffstat (limited to 'src/app_cache.c')
-rw-r--r--src/app_cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/app_cache.c b/src/app_cache.c
index f4dd951..c6b89e1 100644
--- a/src/app_cache.c
+++ b/src/app_cache.c
@@ -89,7 +89,7 @@ static int cache_download(struct cache_ctx *cctx, struct apk_database *db)
foreach_array_item(change, changeset.changes) {
pkg = change->new_pkg;
- if ((pkg == NULL) || (pkg->repos & db->local_repos))
+ if (!pkg || (pkg->repos & db->local_repos) || !pkg->installed_size)
continue;
repo = apk_db_select_repo(db, pkg);