diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2018-08-21 13:18:54 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2018-08-21 13:20:05 +0000 |
commit | 2f9c08c14eb03797d063b714f7f4cb9efd69a385 (patch) | |
tree | 576283743bd5cafeb46200479411dbb1eeeecb77 | |
parent | 9055edf8cc8cee9d461f2bcbfe58c9793fafd944 (diff) | |
download | aports-2f9c08c14eb03797d063b714f7f4cb9efd69a385.tar.bz2 aports-2f9c08c14eb03797d063b714f7f4cb9efd69a385.tar.xz |
main/apk-tools: backport fix for --no-network
prevent update repository index when --no-network is specified.
ref #9126
-rw-r--r-- | main/apk-tools/0001-prevent-automatic-repository-index-update-with-no-ne.patch | 29 | ||||
-rw-r--r-- | main/apk-tools/APKBUILD | 9 |
2 files changed, 35 insertions, 3 deletions
diff --git a/main/apk-tools/0001-prevent-automatic-repository-index-update-with-no-ne.patch b/main/apk-tools/0001-prevent-automatic-repository-index-update-with-no-ne.patch new file mode 100644 index 0000000000..67fd7eab73 --- /dev/null +++ b/main/apk-tools/0001-prevent-automatic-repository-index-update-with-no-ne.patch @@ -0,0 +1,29 @@ +From 13c534db7755865380bfd930aa384aebc16347e6 Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +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 + diff --git a/main/apk-tools/APKBUILD b/main/apk-tools/APKBUILD index 17c3401d70..6249568672 100644 --- a/main/apk-tools/APKBUILD +++ b/main/apk-tools/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=apk-tools pkgver=2.10.0 -pkgrel=2 +pkgrel=3 pkgdesc="Alpine Package Keeper - package manager for alpine" subpackages="$pkgname-static" depends= @@ -14,7 +14,9 @@ if [ "$CBUILD" = "$CHOST" ]; then fi source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.xz 0001-list-fix-segmentation-fault-with-virtual-packages.patch - 0001-prevent-automatic-repository-index-update-for-apk-de.patch" + 0001-prevent-automatic-repository-index-update-for-apk-de.patch + 0001-prevent-automatic-repository-index-update-with-no-ne.patch + " url="https://git.alpinelinux.org/cgit/apk-tools/" arch="all" @@ -85,4 +87,5 @@ luaapk() { sha512sums="96b840fa5fb7342bb5f6ad5c25e837f705299256e168130d6ef5c1940569df3e7dfa50d36128c0f9a76e662c80b342dd92a8270acd82b4eb91093020b599fcc6 apk-tools-2.10.0.tar.xz 1e83e68b67dd66a0a8ccdbb6ca34ccb7748eff82d032d0d9101b7155a0ff768dc2a849e99387cb9970f0fd9ff5606d08fca9f3bd1a5a561b8b0995d97c69e971 0001-list-fix-segmentation-fault-with-virtual-packages.patch -8fb88998baa470b4ea498a3f75f19d981e7f41055e472fabf24a2c6ae478aa34f686c43b615b3c492ee4805369a1cbff3ee0a2e81b31257b080845b3d492872d 0001-prevent-automatic-repository-index-update-for-apk-de.patch" +8fb88998baa470b4ea498a3f75f19d981e7f41055e472fabf24a2c6ae478aa34f686c43b615b3c492ee4805369a1cbff3ee0a2e81b31257b080845b3d492872d 0001-prevent-automatic-repository-index-update-for-apk-de.patch +17071687e532b00c9f276bb7e42369ec04231b15d223fd3eb803a51eb5cd4f2611d9c7525d905482a42e9b9fc293274887a411a2bf7520eee0607de2bf7a1268 0001-prevent-automatic-repository-index-update-with-no-ne.patch" |