summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/database.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/database.c b/src/database.c
index 70a1053..eea7177 100644
--- a/src/database.c
+++ b/src/database.c
@@ -1520,7 +1520,8 @@ int apk_db_open(struct apk_database *db, struct apk_db_options *dbopts)
goto ret_r;
}
if ((dbopts->open_flags & APK_OPENF_WRITE) &&
- !(dbopts->open_flags & APK_OPENF_NO_AUTOUPDATE))
+ !(dbopts->open_flags & APK_OPENF_NO_AUTOUPDATE) &&
+ !(apk_flags & APK_NO_NETWORK))
db->autoupdate = 1;
if (!dbopts->cache_dir) dbopts->cache_dir = "etc/apk/cache";