0001-Sychronize-filesystem.patch 970 B

123456789101112131415161718192021222324252627282930313233
  1. From 60abb58d9db663e6050d8d61d67e0e893306dfb0 Mon Sep 17 00:00:00 2001
  2. From: Kevin Mihelich <kevin@archlinuxarm.org>
  3. Date: Sat, 13 Sep 2014 18:58:16 -0600
  4. Subject: [PATCH 1/3] Sychronize filesystem
  5. Since many problems arise from improper flushing of the filesystem,
  6. particularly package installations followed by a reboot very shorly after,
  7. this will perform a sync() after installations and removals to ensure a
  8. consistent filesystem state after package operations.
  9. Signed-off-by: Kevin Mihelich <kevin@archlinuxarm.org>
  10. ---
  11. lib/libalpm/trans.c | 3 +++
  12. 1 file changed, 3 insertions(+)
  13. diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c
  14. index af964832..b3f9049e 100644
  15. --- a/lib/libalpm/trans.c
  16. +++ b/lib/libalpm/trans.c
  17. @@ -230,6 +230,9 @@ int SYMEXPORT alpm_trans_commit(alpm_handle_t *handle, alpm_list_t **data)
  18. trans->state = STATE_COMMITED;
  19. + _alpm_log(handle, ALPM_LOG_DEBUG, "synchronizing filesystem\n");
  20. + sync();
  21. +
  22. return 0;
  23. }
  24. --
  25. 2.17.0