commit:     99c24c9cd97877fe0a052f028061c177e066360c
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 24 15:26:17 2021 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sun Oct 31 19:32:41 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=99c24c9c

xdg-utils.eclass: disable fdatasync() in update-mime-database

This speeds up installation dramatically on slow disks, and may reduce
wear on solid state storage.

Portage will call 'sync' after installation if FEATURES="merge-sync" is
enabled, so the risk should be small.

Closes: https://bugs.gentoo.org/819783
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 eclass/xdg-utils.eclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/eclass/xdg-utils.eclass b/eclass/xdg-utils.eclass
index 35084fc8164..a834d5d3acc 100644
--- a/eclass/xdg-utils.eclass
+++ b/eclass/xdg-utils.eclass
@@ -125,6 +125,9 @@ xdg_mimeinfo_database_update() {
                return
        fi
 
+       # https://bugs.gentoo.org/819783
+       local -x PKGSYSTEM_ENABLE_FSYNC=0
+
        ebegin "Updating shared mime info database"
        update-mime-database "${EROOT%/}${MIMEINFO_DATABASE_DIR}"
        eend $?

Reply via email to