summaryrefslogtreecommitdiff
path: root/libre/pacman/0001-Sychronize-filesystem.patch
blob: b2a55e1bfc9c6731ff227da70c6a47a290dc66c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From faad6b96560cc1c7c7e816299e56b3a1ea7098e0 Mon Sep 17 00:00:00 2001
From: Kevin Mihelich 
Date: Sat, 13 Sep 2014 18:58:16 -0600
Subject: [PATCH 1/3] 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 
---
 lib/libalpm/trans.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c
index 13984707..82835ee5 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.13.1