for ex. sudo apt install gthumb will spend a small time doing everything else. When it calls update-mime-database /usr/share/mime it spends more than 10 minutes!!!
I wonder if I could install everything w/o calling update-mime-database, then manually call it with ionice update-mime-database /usr/share/mime (as it also generates a lot of IO despite writing just about 4MB iotop) in a child/background process?
any other tip/idea?
ubuntu 20.04
apt updateafter setting the env variable PKGSYSTEM_ENABLE_FSYNC=0, as suggested in the ArchLinux forum. – Pierre-Antoine Feb 12 '21 at 11:55PKGSYSTEM_ENABLE_FSYNC=0immediately before runningupdate-mime-database, but it won't do anything forapt update(it would need to be before aptinstallor*upgrade) – Auspex Jan 02 '24 at 18:35update-mime-database. That gets called in thepostinstscripts, so is not strictly under apt's control. You could technically copyupdate-mime-databaseto somewhere else, and symlinkupdate-mime-databaseto/usr/bin/true, but then you'd have to remember to run the original program manually after all upgrades. Probably easier to putPKGSYSTEM_ENABLE_FSYNC=0in the system environment, though to be honest, it runs so fast with that set that I'm not at all confident it's doing anything! – Auspex Jan 02 '24 at 18:41