PKGBUILDs/core/pacman/0001-Sychronize-filesystem.patch

33 lines
963 B
Diff
Raw Normal View History

2014-12-29 05:11:59 +00:00
From d78f14170b2950fd3a252bec1ecc808a6de433b1 Mon Sep 17 00:00:00 2001
2014-04-23 00:34:32 +00:00
From: Kevin Mihelich <kevin@archlinuxarm.org>
Date: Sat, 13 Sep 2014 18:58:16 -0600
2014-04-23 00:34:32 +00:00
Subject: [PATCH] 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(+)
2014-04-23 00:34:32 +00:00
diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c
2014-12-29 05:11:59 +00:00
index e680feb..1e103f2 100644
--- a/lib/libalpm/trans.c
+++ b/lib/libalpm/trans.c
2014-12-29 05:11:59 +00:00
@@ -211,6 +211,9 @@ int SYMEXPORT alpm_trans_commit(alpm_handle_t *handle, alpm_list_t **data)
2014-04-23 00:34:32 +00:00
trans->state = STATE_COMMITED;
2014-04-23 00:34:32 +00:00
+ _alpm_log(handle, ALPM_LOG_DEBUG, "synchronizing filesystem\n");
2014-04-23 00:34:32 +00:00
+ sync();
+
return 0;
2014-04-23 00:34:32 +00:00
}
--
2014-12-29 05:11:59 +00:00
2.2.1
2014-04-23 00:34:32 +00:00