From 74f67ab81c646b9c1fb1136776cf05a949de2526 Mon Sep 17 00:00:00 2001 From: Timo Teräs Date: Mon, 15 Nov 2021 13:35:59 +0200 Subject: 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. --- src/app_add.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/app_add.c') diff --git a/src/app_add.c b/src/app_add.c index 4bc9894..1472506 100644 --- a/src/app_add.c +++ b/src/app_add.c @@ -96,6 +96,7 @@ static struct apk_package *create_virtual_package(struct apk_database *db, struc virtpkg->version = apk_atomize_dup(&db->atoms, APK_BLOB_STR(ver)); virtpkg->description = strdup("virtual meta package"); virtpkg->arch = apk_atomize(&db->atoms, APK_BLOB_STR("noarch")); + virtpkg->repos |= BIT(APK_REPOSITORY_CACHED); mdctx = EVP_MD_CTX_new(); EVP_DigestInit_ex(mdctx, apk_checksum_default(), NULL); -- cgit v1.2.3-60-g2f50