Commit 13c534db authored by Natanael Copa's avatar Natanael Copa

prevent automatic repository index update with --no-network

We should not update repository index when --no-network is specified.

ref #9126
parent 1d55b948
......@@ -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";
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment