diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2018-08-21 12:24:26 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2018-08-21 12:25:37 +0000 |
commit | 13c534db7755865380bfd930aa384aebc16347e6 (patch) | |
tree | 20caf3b1421beca5434149e7aa0b21ed8cdeb353 /src | |
parent | 1d55b9488f2d9c6d367fa7f21b058466c24f3ad1 (diff) | |
download | apk-tools-13c534db7755865380bfd930aa384aebc16347e6.tar.gz apk-tools-13c534db7755865380bfd930aa384aebc16347e6.tar.bz2 apk-tools-13c534db7755865380bfd930aa384aebc16347e6.tar.xz apk-tools-13c534db7755865380bfd930aa384aebc16347e6.zip |
prevent automatic repository index update with --no-network
We should not update repository index when --no-network is specified.
ref #9126
Diffstat (limited to 'src')
-rw-r--r-- | src/database.c | 3 |
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"; |