aboutsummaryrefslogtreecommitdiffstats
path: root/main/apk-tools/0001-prevent-automatic-repository-index-update-for-apk-de.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/apk-tools/0001-prevent-automatic-repository-index-update-for-apk-de.patch')
-rw-r--r--main/apk-tools/0001-prevent-automatic-repository-index-update-for-apk-de.patch73
1 files changed, 0 insertions, 73 deletions
diff --git a/main/apk-tools/0001-prevent-automatic-repository-index-update-for-apk-de.patch b/main/apk-tools/0001-prevent-automatic-repository-index-update-for-apk-de.patch
deleted file mode 100644
index 61bbe0586f8..00000000000
--- a/main/apk-tools/0001-prevent-automatic-repository-index-update-for-apk-de.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From e1a05c74cb8ae6ab41ee960343cc64a0a9af95a5 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
-Date: Wed, 18 Jul 2018 13:28:49 +0300
-Subject: [PATCH] prevent automatic repository index update for 'apk del'
-
-ref #9063
----
- src/apk_database.h | 3 ++-
- src/database.c | 6 ++++--
- src/del.c | 2 +-
- 3 files changed, 7 insertions(+), 4 deletions(-)
-
-diff --git a/src/apk_database.h b/src/apk_database.h
-index 19bafcd..2a7cb3b 100644
---- a/src/apk_database.h
-+++ b/src/apk_database.h
-@@ -156,7 +156,7 @@ struct apk_database {
- unsigned int pending_triggers;
- int performing_self_upgrade : 1;
- int permanent : 1;
-- int open_write : 1;
-+ int autoupdate : 1;
- int open_complete : 1;
- int compat_newfeatures : 1;
- int compat_notinstallable : 1;
-@@ -211,6 +211,7 @@ struct apk_db_file *apk_db_file_query(struct apk_database *db,
- #define APK_OPENF_NO_SYS_REPOS 0x0100
- #define APK_OPENF_NO_INSTALLED_REPO 0x0200
- #define APK_OPENF_CACHE_WRITE 0x0400
-+#define APK_OPENF_NO_AUTOUPDATE 0x0800
-
- #define APK_OPENF_NO_REPOS (APK_OPENF_NO_SYS_REPOS | \
- APK_OPENF_NO_INSTALLED_REPO)
-diff --git a/src/database.c b/src/database.c
-index db34ed3..70a1053 100644
---- a/src/database.c
-+++ b/src/database.c
-@@ -1519,7 +1519,9 @@ int apk_db_open(struct apk_database *db, struct apk_db_options *dbopts)
- r = -1;
- goto ret_r;
- }
-- if (dbopts->open_flags & APK_OPENF_WRITE) db->open_write = 1;
-+ if ((dbopts->open_flags & APK_OPENF_WRITE) &&
-+ !(dbopts->open_flags & APK_OPENF_NO_AUTOUPDATE))
-+ db->autoupdate = 1;
- if (!dbopts->cache_dir) dbopts->cache_dir = "etc/apk/cache";
-
- apk_db_setup_repositories(db, dbopts->cache_dir);
-@@ -2266,7 +2268,7 @@ int apk_db_add_repository(apk_database_t _db, apk_blob_t _repository)
- r = apk_repo_format_real_url(db, repo, NULL, buf, sizeof(buf));
- if (r == 0) apk_message("fetch %s", buf);
- } else {
-- if (db->open_write) apk_repository_update(db, repo);
-+ if (db->autoupdate) apk_repository_update(db, repo);
- r = apk_repo_format_cache_index(APK_BLOB_BUF(buf), repo);
- }
- } else {
-diff --git a/src/del.c b/src/del.c
-index d1a6015..8e149ab 100644
---- a/src/del.c
-+++ b/src/del.c
-@@ -161,7 +161,7 @@ static struct apk_applet apk_del = {
- .name = "del",
- .help = "Remove PACKAGEs from 'world' and uninstall them",
- .arguments = "PACKAGE...",
-- .open_flags = APK_OPENF_WRITE,
-+ .open_flags = APK_OPENF_WRITE | APK_OPENF_NO_AUTOUPDATE,
- .context_size = sizeof(struct del_ctx),
- .optgroups = { &optgroup_global, &optgroup_commit, &optgroup_applet },
- .main = del_main,
---
-2.18.0
-