Skip to content

Commit

Permalink
prevent automatic repository index update with --no-network
Browse files Browse the repository at this point in the history
We should not update repository index when --no-network is specified.

ref #9126
  • Loading branch information
ncopa committed Aug 21, 2018
1 parent 1d55b94 commit 13c534d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/database.c
Expand Up @@ -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";

Expand Down

0 comments on commit 13c534d

Please sign in to comment.