summaryrefslogtreecommitdiff
path: root/src/apk.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2017-02-27 11:12:42 +0200
committerTimo Teräs <timo.teras@iki.fi>2017-02-27 11:14:33 +0200
commit6542d4ca2c69c7275ce8fc4fe6df185595a97ed6 (patch)
treecc664babf9a5f90229f6f683c1b30d596603f0b5 /src/apk.c
parentc0f2d88f342f4d185f3991f98b79ab61a03896e4 (diff)
downloadapk-tools-6542d4ca2c69c7275ce8fc4fe6df185595a97ed6.tar.gz
apk-tools-6542d4ca2c69c7275ce8fc4fe6df185595a97ed6.tar.bz2
apk-tools-6542d4ca2c69c7275ce8fc4fe6df185595a97ed6.tar.xz
apk-tools-6542d4ca2c69c7275ce8fc4fe6df185595a97ed6.zip
db: allow overriding cache location
Diffstat (limited to 'src/apk.c')
-rw-r--r--src/apk.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/apk.c b/src/apk.c
index 1dab55d..37cc4e9 100644
--- a/src/apk.c
+++ b/src/apk.c
@@ -130,6 +130,9 @@ static int option_parse_global(void *ctx, struct apk_db_options *dbopts, int opt
case 0x115:
apk_flags |= APK_NO_CACHE;
break;
+ case 0x116:
+ dbopts->cache_dir = optarg;
+ break;
case 0x112:
dbopts->arch = optarg;
break;
@@ -180,6 +183,8 @@ static const struct apk_option options_global[] = {
required_argument, "REPOFILE" },
{ 0x109, "no-network", "Do not use network (cache is still used)" },
{ 0x115, "no-cache", "Read uncached index from network" },
+ { 0x116, "cache-dir", "Override cache directory",
+ required_argument, "CACHEDIR" },
{ 0x112, "arch", "Use architecture with --root",
required_argument, "ARCH" },
{ 0x114, "print-arch", "Print default arch and exit" },