You are not logged in.

#1 2020-05-17 07:25:22

snap.ve
Member
Registered: 2020-04-02
Posts: 60

[SOLVED] Updating the MIME type database is too slow

Hi there! Can someone help me with that? Last updates with pacman -Syu make too long update MIME database. Sometimes it takes 2 minutes or bigger when I update only one package. Idk how fix this. I was try this methot but it did not help me.

Last edited by snap.ve (2020-05-17 11:31:27)

Offline

#2 2020-05-17 10:36:07

yan12125
Member
Registered: 2017-11-01
Posts: 23

Re: [SOLVED] Updating the MIME type database is too slow

The cause is that /usr/bin/update-mime-databse in new shared-mime-info runs fdatasync() after writing each file. [1] If you are ABSOLUTELY sure that no power failure will occur during the process, you can create a file /etc/pacman.d/hooks/update-mime-database.hook

[Trigger]
Type = Path
Operation = Install
Operation = Upgrade
Operation = Remove
Target = usr/share/mime/packages/*.xml

[Action]
Description = Updating the MIME type database...
When = PostTransaction
Exec = /usr/bin/env PKGSYSTEM_ENABLE_FSYNC=0 /usr/bin/update-mime-database /usr/share/mime

[1] https://bugs.freedesktop.org/show_bug.cgi?id=70366

Offline

#3 2020-05-17 10:50:22

snap.ve
Member
Registered: 2020-04-02
Posts: 60

Re: [SOLVED] Updating the MIME type database is too slow

yan12125 wrote:

The cause is that /usr/bin/update-mime-databse in new shared-mime-info runs fdatasync() after writing each file. [1] If you are ABSOLUTELY sure that no power failure will occur during the process, you can create a file /etc/pacman.d/hooks/update-mime-database.hook

[Trigger]
Type = Path
Operation = Install
Operation = Upgrade
Operation = Remove
Target = usr/share/mime/packages/*.xml

[Action]
Description = Updating the MIME type database...
When = PostTransaction
Exec = /usr/bin/env PKGSYSTEM_ENABLE_FSYNC=0 /usr/bin/update-mime-database /usr/share/mime

[1] https://bugs.freedesktop.org/show_bug.cgi?id=70366

Yes! It work's thank you,but... Really there will be no update with a fix? This is a pretty serious bug.

Last edited by snap.ve (2020-05-17 11:04:34)

Offline

#4 2020-05-17 12:35:29

yan12125
Member
Registered: 2017-11-01
Posts: 23

Re: [SOLVED] Updating the MIME type database is too slow

It turns out to be a regression in package shared-mime-info. I created https://bugs.archlinux.org/task/66687 for that.

Offline

#5 2020-05-17 13:08:51

snap.ve
Member
Registered: 2020-04-02
Posts: 60

Re: [SOLVED] Updating the MIME type database is too slow

Oh, thank you

Offline

Board footer

Powered by FluxBB