PKGBUILDs/core/pacman/0001-Sychronize-filesystem.patch
Kevin Mihelich cb5ba97b6c core/pacman to 4.1.2-6.1
Moved synchronizing filesystem to libalpm transaction function that handles
adding and removing packages. "synchronizing filesystem" message moved to the
debug messages.

Fixes #975
2014-09-14 01:18:51 +00:00

32 lines
963 B
Diff

From f1f7a14e173822fb075576c69f8bd4476f5263da Mon Sep 17 00:00:00 2001
From: Kevin Mihelich <kevin@archlinuxarm.org>
Date: Sat, 13 Sep 2014 18:58:16 -0600
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(+)
diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c
index 8d4e0e7..886f87b 100644
--- a/lib/libalpm/trans.c
+++ b/lib/libalpm/trans.c
@@ -175,6 +175,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.1.0