summaryrefslogtreecommitdiff
path: root/src/apk.c
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-08-06 16:00:20 +0300
committerTimo Teras <timo.teras@iki.fi>2009-08-06 16:00:20 +0300
commitf02f326238fd1e6424bf914e102ce265e7c156ec (patch)
treeceded7eb995efa68086b613cbc286d198b60da0a /src/apk.c
parentced1fa83d6361ebfdc40920d98eb292ca4661b4e (diff)
downloadapk-tools-f02f326238fd1e6424bf914e102ce265e7c156ec.tar.gz
apk-tools-f02f326238fd1e6424bf914e102ce265e7c156ec.tar.bz2
apk-tools-f02f326238fd1e6424bf914e102ce265e7c156ec.tar.xz
apk-tools-f02f326238fd1e6424bf914e102ce265e7c156ec.zip
db: prefer local repositories, and implement --no-network
this helps boots sequence when network is not available.
Diffstat (limited to 'src/apk.c')
-rw-r--r--src/apk.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/apk.c b/src/apk.c
index bbb33fb..6c4acd7 100644
--- a/src/apk.c
+++ b/src/apk.c
@@ -55,7 +55,8 @@ static struct apk_option generic_options[] = {
{ 0x107, "keys-dir", "Override directory of trusted keys",
required_argument, "KEYSDIR" },
{ 0x108, "repositories-file", "Override repositories file",
- required_argument, "REPOFILE" }
+ required_argument, "REPOFILE" },
+ { 0x109, "no-network", "Do not use network (cache is still used)" },
};
const char *apk_error_str(int error)
@@ -380,6 +381,9 @@ int main(int argc, char **argv)
case 0x105:
apk_wait = atoi(optarg);
break;
+ case 0x109:
+ apk_flags |= APK_NO_NETWORK;
+ break;
default:
if (applet == NULL || applet->parse == NULL ||
applet->parse(ctx, &dbopts, r,