Gentoo Archives: gentoo-dev

From: Mike Gilbert <floppym@g.o>
To: gentoo-dev@l.g.o
Cc: gnome@g.o, freedesktop-bugs@g.o, Mike Gilbert <floppym@g.o>
Subject: [gentoo-dev] [PATCH] xdg-utils.eclass: disable fdatasync() in update-mime-database
Date: Sun, 24 Oct 2021 15:34:08
Message-Id: 20211024153344.2731446-1-floppym@gentoo.org
1 This speeds up installation dramatically on slow disks, and may reduce
2 wear on solid state storage.
3
4 Portage will call 'sync' after installation if FEATURES="merge-sync" is
5 enabled, so the risk should be small.
6
7 Closes: https://bugs.gentoo.org/819783
8 Signed-off-by: Mike Gilbert <floppym@g.o>
9 ---
10 eclass/xdg-utils.eclass | 3 +++
11 1 file changed, 3 insertions(+)
12
13 diff --git a/eclass/xdg-utils.eclass b/eclass/xdg-utils.eclass
14 index 35084fc8164..a834d5d3acc 100644
15 --- a/eclass/xdg-utils.eclass
16 +++ b/eclass/xdg-utils.eclass
17 @@ -125,6 +125,9 @@ xdg_mimeinfo_database_update() {
18 return
19 fi
20
21 + # https://bugs.gentoo.org/819783
22 + local -x PKGSYSTEM_ENABLE_FSYNC=0
23 +
24 ebegin "Updating shared mime info database"
25 update-mime-database "${EROOT%/}${MIMEINFO_DATABASE_DIR}"
26 eend $?
27 --
28 2.33.1