From f727cd2ebcc84d6fe2e84c16b42a969d5abf6ff2 Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Mon, 21 Apr 2014 21:39:09 -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 --- src/pacman/remove.c | 4 ++++ src/pacman/sync.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/src/pacman/remove.c b/src/pacman/remove.c index 933e6f7..37e6b97 100644 --- a/src/pacman/remove.c +++ b/src/pacman/remove.c @@ -177,6 +177,10 @@ cleanup: if(trans_release() == -1) { retval = 1; } + + printf(_("synchronizing filesystem...\n")); + sync(); + return retval; } diff --git a/src/pacman/sync.c b/src/pacman/sync.c index bf19d57..ffffdfe 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -879,6 +879,9 @@ cleanup: retval = 1; } + printf(_("synchronizing filesystem...\n")); + sync(); + return retval; } -- 1.9.0