diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2011-05-23 13:40:46 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2011-05-23 13:40:55 +0000 |
commit | 6361c75dd52142737f3c52ff74102327c8c6963b (patch) | |
tree | e47ba3f4ad20cb745010b62e2920c64abe149414 /main/apk-tools/0006-db-remount-ro-cache-to-rw-earlier-for-update-to-work.patch | |
parent | a3de2cf1f7ccf2ba068ef3e7689b9013fb2ecac1 (diff) | |
download | aports-6361c75dd52142737f3c52ff74102327c8c6963b.tar.bz2 aports-6361c75dd52142737f3c52ff74102327c8c6963b.tar.xz |
main/apk-tools: upgrade to 2.1.0
Diffstat (limited to 'main/apk-tools/0006-db-remount-ro-cache-to-rw-earlier-for-update-to-work.patch')
-rw-r--r-- | main/apk-tools/0006-db-remount-ro-cache-to-rw-earlier-for-update-to-work.patch | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/main/apk-tools/0006-db-remount-ro-cache-to-rw-earlier-for-update-to-work.patch b/main/apk-tools/0006-db-remount-ro-cache-to-rw-earlier-for-update-to-work.patch deleted file mode 100644 index 28c837be69..0000000000 --- a/main/apk-tools/0006-db-remount-ro-cache-to-rw-earlier-for-update-to-work.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 99010588913344cf037aa163a47acd469fff5594 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi> -Date: Fri, 22 Apr 2011 11:24:02 +0300 -Subject: [PATCH 6/7] db: remount ro cache to rw earlier for update to work - ---- - src/database.c | 31 ++++++++++++++++--------------- - 1 files changed, 16 insertions(+), 15 deletions(-) - -diff --git a/src/database.c b/src/database.c -index 45960d2..bc17ff2 100644 ---- a/src/database.c -+++ b/src/database.c -@@ -1263,6 +1263,22 @@ int apk_db_open(struct apk_database *db, struct apk_db_options *dbopts) - } - } - } -+ -+ if ((dbopts->open_flags & (APK_OPENF_WRITE | APK_OPENF_CACHE_WRITE)) && -+ db->ro_cache) { -+ /* remount cache read-write */ -+ db->cache_remount_dir = find_mountpoint(db->root_fd, db->cache_dir); -+ if (db->cache_remount_dir == NULL) { -+ apk_warning("Unable to find cache directory mount point"); -+ } else if (do_remount(db->cache_remount_dir, "rw") != 0) { -+ free(db->cache_remount_dir); -+ db->cache_remount_dir = NULL; -+ apk_error("Unable to remount cache read-write"); -+ r = EROFS; -+ goto ret_r; -+ } -+ } -+ - if (!(dbopts->open_flags & APK_OPENF_NO_SYS_REPOS)) { - list_for_each_entry(repo, &dbopts->repository_list, list) { - r = apk_db_add_repository(db, APK_BLOB_STR(repo->url)); -@@ -1293,21 +1309,6 @@ int apk_db_open(struct apk_database *db, struct apk_db_options *dbopts) - "might not function properly"); - } - -- if ((dbopts->open_flags & (APK_OPENF_WRITE | APK_OPENF_CACHE_WRITE)) && -- db->ro_cache) { -- /* remount cache read-write */ -- db->cache_remount_dir = find_mountpoint(db->root_fd, db->cache_dir); -- if (db->cache_remount_dir == NULL) { -- apk_warning("Unable to find cache directory mount point"); -- } else if (do_remount(db->cache_remount_dir, "rw") != 0) { -- free(db->cache_remount_dir); -- db->cache_remount_dir = NULL; -- apk_error("Unable to remount cache read-write"); -- r = EROFS; -- goto ret_r; -- } -- } -- - return rr; - - ret_errno: --- -1.7.4.5 - |