Bug 12046

Summary: Allow shared-mime-info to just install the cache
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Ross Burton <ross.burton>
Component: coreAssignee: Unassigned <unassigned>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: Medium CC: meta.mr.watcher, meta.watcher, patrick.ohly, randy.macleod
Version: 2.5   
Target Milestone: Future   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Ross Burton 2017-09-05 15:13:53 UTC
shared-mime-info is just a pile of data in various forms:

* Sources: /usr/share/mime/packages/freedesktop.xml is the canonical source, and other packages can extend the databases by adding more files into that directory
* Database: /usr/share/mime/*/*.xml.  Lots of files generated from the sources by update-mime-database
* Cache: a machine-readable/mmapable form of the database.

In the typical desktop world all of these files need to exist.  Packages can be added and removed so the sources need to be always present to build the database/cache, and applications that can read the cache directly (such as glib) do whilst others read the databases.

In the embedded world this may be true but may not be.  If the system is static and it is known that all users of shared-mime-info can use the cache, then we should be able to install just the cache.

I suspect the best approach will be to generate the databases/caches at rootfs time, and then have a way to remove the package that ships the sources.
Comment 1 Ross Burton 2020-01-29 16:47:19 UTC
Still not a bad idea.