summaryrefslogtreecommitdiff
path: root/libre/pacman/0001-Sychronize-filesystem.patch
diff options
context:
space:
mode:
Diffstat (limited to 'libre/pacman/0001-Sychronize-filesystem.patch')
-rw-r--r--libre/pacman/0001-Sychronize-filesystem.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/libre/pacman/0001-Sychronize-filesystem.patch b/libre/pacman/0001-Sychronize-filesystem.patch
new file mode 100644
index 000000000..7c5f6fdcb
--- /dev/null
+++ b/libre/pacman/0001-Sychronize-filesystem.patch
@@ -0,0 +1,32 @@
+From 25b7d2243038723c95402c0e6e1bdaa38817c92f Mon Sep 17 00:00:00 2001
+From: Kevin Mihelich <kevin@archlinuxarm.org>
+Date: Sat, 13 Sep 2014 18:58:16 -0600
+Subject: [PATCH 1/2] Sychronize filesystem
+
+Since many problems arise from improper flushing of the filesystem,
+particularly package installations followed by a reboot very shorly after,
+this will perform a sync() after installations and removals to ensure a
+consistent filesystem state after package operations.
+
+Signed-off-by: Kevin Mihelich <kevin@archlinuxarm.org>
+---
+ lib/libalpm/trans.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c
+index 239d6a1..8a6260a 100644
+--- a/lib/libalpm/trans.c
++++ b/lib/libalpm/trans.c
+@@ -230,6 +230,9 @@ int SYMEXPORT alpm_trans_commit(alpm_handle_t *handle, alpm_list_t **data)
+
+ trans->state = STATE_COMMITED;
+
++ _alpm_log(handle, ALPM_LOG_DEBUG, "synchronizing filesystem\n");
++ sync();
++
+ return 0;
+ }
+
+--
+2.7.0
+