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-11-15 13:35:59 +0200
commit16e0f6df7f0d632976d788fb3829280a39dabfaf (patch)
treecad2032fc62ffae780531a644f096622aa134beb /src/app_cache.c
parent3cb5ce2a37a08dc41c88dc1d767226e5cab6032f (diff)
downloadapk-tools-16e0f6df7f0d632976d788fb3829280a39dabfaf.tar.gz
apk-tools-16e0f6df7f0d632976d788fb3829280a39dabfaf.tar.bz2
apk-tools-16e0f6df7f0d632976d788fb3829280a39dabfaf.tar.xz
apk-tools-16e0f6df7f0d632976d788fb3829280a39dabfaf.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 b744f25..95eae7a 100644
--- a/src/app_cache.c
+++ b/src/app_cache.c
@@ -91,7 +91,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);