summaryrefslogtreecommitdiff
path: root/src/cache.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2013-05-30 08:46:30 +0300
committerTimo Teräs <timo.teras@iki.fi>2013-05-30 08:48:32 +0300
commitaec93ee730f7a2e0196ae05fdd45e866d2510e41 (patch)
treeb51fdb4924941ea15eea0356fa6e69a7afc91e14 /src/cache.c
parent035da870362494bcb4ed092e27278c290b204410 (diff)
downloadapk-tools-aec93ee730f7a2e0196ae05fdd45e866d2510e41.tar.gz
apk-tools-aec93ee730f7a2e0196ae05fdd45e866d2510e41.tar.bz2
apk-tools-aec93ee730f7a2e0196ae05fdd45e866d2510e41.tar.xz
apk-tools-aec93ee730f7a2e0196ae05fdd45e866d2510e41.zip
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.
Diffstat (limited to 'src/cache.c')
-rw-r--r--src/cache.c4
1 files changed, 2 insertions, 2 deletions
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));