From aec93ee730f7a2e0196ae05fdd45e866d2510e41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Thu, 30 May 2013 08:46:30 +0300 Subject: db: unify handling of special packages make cache a special kind of repository, and automatically cache special packages (virtual packages, or ones installed from command line). add test cases for handling virtual packages. fixes #1617. --- src/cache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/cache.c') diff --git a/src/cache.c b/src/cache.c index 95de682..b82ecf6 100644 --- a/src/cache.c +++ b/src/cache.c @@ -43,11 +43,11 @@ static int cache_download(struct apk_database *db) change = &changeset.changes->item[i]; pkg = change->newpkg; - if (pkg->in_cache) + if (pkg->repos & db->local_repos) continue; repo = apk_db_select_repo(db, pkg); - if (repo == NULL || !apk_repo_is_remote(repo)) + if (repo == NULL) continue; apk_pkg_format_cache(pkg, APK_BLOB_BUF(cacheitem)); -- cgit v1.2.3