Skip to content

Make MIME work on desktops

Andreas Müller openembedded-core 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest10 patches 5 repliesIn review
  2. v111 patches 12 repliesSuperseded

Changes in v2 from the cover letter

* Shelve global path export thingy
* Add me as maintainer of itstool (let's consider 'ü' in my name as test case :)
* Change "to to" to "to" in commit message
* Build shared-mime-info from git to allow automated upgrades
* mime-xdg.bbclass: Be prepared for packages as libreoffice: Desktop files installed are absolut symlinks broken for us. In case other projects do same:
Offer asolution and guide recipe writers how to handle by generating warnings with instructions how to handle.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10itstool: add from meta-oemeta/conf/distro/include/maintainers.inc meta/recipes-support/itstool/itstool/0001-Native-Don-t-use-build-time-hardcoded-python-binary-.patch meta/recipes-support/itstool/itstool/0002-Don-t-use-build-time-hardcoded-python-binary-path.patch +1 more+85 -00 replies
2/10itstool: extend to nativesdkmeta/recipes-support/itstool/itstool_2.0.6.bb+2 -10 replies
3/10shared-mime-info: upgrade 1.10 -> 1.15meta/recipes-support/shared-mime-info/shared-mime-info/install-data-hook.patch meta/recipes-support/shared-mime-info/shared-mime-info/parallelmake.patch meta/recipes-support/shared-mime-info/shared-mime-info_1.10.bb +1 more+6 -680 replies
4/10mime.bbclass: reworkmeta/classes/mime.bbclass scripts/postinst-intercepts/update_mime_database+41 -300 replies
5/10insane.bbclass: introduce a warning for mime missing in inheritmeta/classes/insane.bbclass+12 -00 replies
6/10shared-mime-info: add mime to inheritmeta/recipes-support/shared-mime-info/shared-mime-info_git.bb+1 -10 replies
7/10gcr: add mime to inheritmeta/recipes-gnome/gcr/gcr_3.34.0.bb+1 -10 replies
8/10mime-xdg.bbclass: initial addmeta/classes/mime-xdg.bbclass scripts/postinst-intercepts/update_desktop_database+82 -00 replies
9/10insane.bbclass: Spawn warning for missing mime-xdg in inheritmeta/classes/insane.bbclass+30 -10 replies
10/10gcr: add mime-xdg to inheritmeta/recipes-gnome/gcr/gcr_3.34.0.bb+1 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH][v2 00/10] Make MIME work on desktops

On fresh images file-browsers do not know how to open files and usually open a dialog with ALL applications available on the machine. This is not what users are used to when working with linux: For just one application installed per Mime-Type, the application is opened automatically.

To get a working MIME on desktop it needs two 'databases' on target:

1. Mime-Types: This is handled by mime.bbclass and creates database in /usr/share/mime/mime.cache.
2. Mime associations: A simple text-list of pairs Mime-Type <-> application in /usr/share/applications/mimeinfo.cache

This patch series updates/implements/enhances both parts to get images work as expected.

@Khem: This series creates many QA warnings for layers in meta-openembedded and a patch series fixing many was prepared [1]. Once this series get's applied (or you ask for it) I can send them out.

[1] https://github.com/schnitzeltony/meta-openembedded/tree/work-2020-01

V1 -> V2:
* Shelve global path export thingy
* Add me as maintainer of itstool (let's consider 'ü' in my name as test case :)
* Change "to to" to "to" in commit message
* Build shared-mime-info from git to allow automated upgrades
* mime-xdg.bbclass: Be prepared for packages as libreoffice: Desktop files installed are absolut symlinks broken for us. In case other projects do same:
Offer asolution and guide recipe writers how to handle by generating warnings with instructions how to handle.

Andreas Müller (10):
itstool: add from meta-oe
itstool: extend to nativesdk
shared-mime-info: upgrade 1.10 -> 1.15
mime.bbclass: rework
insane.bbclass: introduce a warning for mime missing in inherit
shared-mime-info: add mime to inherit
gcr: add mime to inherit
mime-xdg.bbclass: initial add
insane.bbclass: Spawn warning for missing mime-xdg in inherit
gcr: add mime-xdg to inherit

 meta/classes/insane.bbclass                   | 41 ++++++++++
 meta/classes/mime-xdg.bbclass                 | 74 +++++++++++++++++++
 meta/classes/mime.bbclass                     | 62 ++++++++--------
 meta/conf/distro/include/maintainers.inc      |  1 +
 meta/recipes-gnome/gcr/gcr_3.34.0.bb          |  2 +-
 ...-build-time-hardcoded-python-binary-.patch | 35 +++++++++
 ...ld-time-hardcoded-python-binary-path.patch | 29 ++++++++
 meta/recipes-support/itstool/itstool_2.0.6.bb | 21 ++++++
 .../shared-mime-info/install-data-hook.patch  | 25 -------
 .../shared-mime-info/parallelmake.patch       | 33 ---------
 .../shared-mime-info/shared-mime-info_1.10.bb |  7 --
 ...-mime-info.inc => shared-mime-info_git.bb} |  9 ++-
 .../update_desktop_database                   |  8 ++
 .../postinst-intercepts/update_mime_database  |  9 +++
 14 files changed, 257 insertions(+), 99 deletions(-)
 create mode 100644 meta/classes/mime-xdg.bbclass
 create mode 100644 meta/recipes-support/itstool/itstool/0001-Native-Don-t-use-build-time-hardcoded-python-binary-.patch
 create mode 100644 meta/recipes-support/itstool/itstool/0002-Don-t-use-build-time-hardcoded-python-binary-path.patch
 create mode 100644 meta/recipes-support/itstool/itstool_2.0.6.bb
 delete mode 100644 meta/recipes-support/shared-mime-info/shared-mime-info/install-data-hook.patch
 delete mode 100644 meta/recipes-support/shared-mime-info/shared-mime-info/parallelmake.patch
 delete mode 100644 meta/recipes-support/shared-mime-info/shared-mime-info_1.10.bb
 rename meta/recipes-support/shared-mime-info/{shared-mime-info.inc => shared-mime-info_git.bb} (75%)
 create mode 100644 scripts/postinst-intercepts/update_desktop_database
 create mode 100644 scripts/postinst-intercepts/update_mime_database
Signature · 1 line
2.21.0