From 13c534db7755865380bfd930aa384aebc16347e6 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Tue, 21 Aug 2018 12:24:26 +0000 Subject: [PATCH] prevent automatic repository index update with --no-network We should not update repository index when --no-network is specified. ref #9126 --- src/database.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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"; -- 2.18.0