diff options
author | Timo Teräs <timo.teras@iki.fi> | 2012-02-22 13:57:05 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2012-02-22 13:57:05 +0200 |
commit | 77e203bf3224293d8f8e01dd15d6262eed840cf9 (patch) | |
tree | ddddccac0f22e2cc7f7f6a625962a322ff83ea99 /src/cache.c | |
parent | d6337468928b1a11091712351e9c85c2d6603c46 (diff) | |
download | apk-tools-77e203bf3224293d8f8e01dd15d6262eed840cf9.tar.gz apk-tools-77e203bf3224293d8f8e01dd15d6262eed840cf9.tar.bz2 apk-tools-77e203bf3224293d8f8e01dd15d6262eed840cf9.tar.xz apk-tools-77e203bf3224293d8f8e01dd15d6262eed840cf9.zip |
db, io: load repositories also from etc/apk/repositories.d/*.list
Load additional repositories from $ROOT/etc/apk/repositories.d/*.list
unless --repositories-file is given as parameter.
Diffstat (limited to 'src/cache.c')
-rw-r--r-- | src/cache.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cache.c b/src/cache.c index 45f701f..95de682 100644 --- a/src/cache.c +++ b/src/cache.c @@ -64,16 +64,16 @@ static int cache_download(struct apk_database *db) return ret; } -static void cache_clean_item(struct apk_database *db, const char *filename, struct apk_package *pkg) +static void cache_clean_item(struct apk_database *db, int dirfd, const char *name, struct apk_package *pkg) { char tmp[PATH_MAX]; apk_blob_t b; int i; - if (pkg != NULL || strcmp(filename, "installed") == 0) + if (pkg != NULL || strcmp(name, "installed") == 0) return; - b = APK_BLOB_STR(filename); + b = APK_BLOB_STR(name); for (i = 0; i < db->num_repos; i++) { /* Check if this is a valid index */ apk_cache_format_index(APK_BLOB_BUF(tmp), &db->repos[i]); @@ -82,9 +82,9 @@ static void cache_clean_item(struct apk_database *db, const char *filename, stru } if (apk_verbosity >= 2) - apk_message("deleting %s", filename); + apk_message("deleting %s", name); if (!(apk_flags & APK_SIMULATE)) - unlinkat(db->cache_fd, filename, 0); + unlinkat(dirfd, name, 0); } static int cache_clean(struct apk_database *db) |