From: michael.opdenacker@bootlin.com
To: docs@lists.yoctoproject.org
Cc: Michael Opdenacker <michael.opdenacker@bootlin.com>
Subject: [kirkstone][PATCH 09/10] manuals: document "mime-xdg" class and MIME_XDG_PACKAGES
Date: Wed, 20 Sep 2023 10:15:43 +0200 [thread overview]
Message-ID: <20230920081544.1226760-10-michael.opdenacker@bootlin.com> (raw)
In-Reply-To: <20230920081544.1226760-1-michael.opdenacker@bootlin.com>
From: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
---
.../migration-guides/migration-3.1.rst | 2 +-
documentation/ref-manual/classes.rst | 21 +++++++++++++++++++
documentation/ref-manual/qa-checks.rst | 2 +-
documentation/ref-manual/variables.rst | 7 +++++++
4 files changed, 30 insertions(+), 2 deletions(-)
diff --git a/documentation/migration-guides/migration-3.1.rst b/documentation/migration-guides/migration-3.1.rst
index e3fdbbe425..53f6f1e03a 100644
--- a/documentation/migration-guides/migration-3.1.rst
+++ b/documentation/migration-guides/migration-3.1.rst
@@ -238,7 +238,7 @@ Warnings will now be shown at ``do_package_qa`` time in the following
circumstances:
- A recipe installs ``.desktop`` files containing ``MimeType`` keys but
- does not inherit the new ``mime-xdg`` class
+ does not inherit the new :ref:`mime-xdg <ref-classes-mime-xdg>` class
- A recipe installs ``.xml`` files into ``${datadir}/mime/packages``
but does not inherit the :ref:`mime <ref-classes-mime>` class
diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst
index d27deb8c08..139f854172 100644
--- a/documentation/ref-manual/classes.rst
+++ b/documentation/ref-manual/classes.rst
@@ -1577,6 +1577,27 @@ The ``mime`` class generates the proper post-install and post-remove
These scriptlets call ``update-mime-database`` to add the MIME types to
the shared database.
+.. _ref-classes-mime-xdg:
+
+``mime-xdg.bbclass``
+====================
+
+The :ref:`mime-xdg <ref-classes-mime-xdg>` class generates the proper
+post-install and post-remove (postinst/postrm) scriptlets for packages
+that install ``.desktop`` files containing ``MimeType`` entries.
+These scriptlets call ``update-desktop-database`` to add the MIME types
+to the database of MIME types handled by desktop files.
+
+Thanks to this class, when users open a file through a file browser
+on recently created images, they don't have to choose the application
+to open the file from the pool of all known applications, even the ones
+that cannot open the selected file.
+
+If you have recipes installing their ``.desktop`` files as absolute
+symbolic links, the detection of such files cannot be done by the current
+implementation of this class. In this case, you have to add the corresponding
+package names to the :term:`MIME_XDG_PACKAGES` variable.
+
.. _ref-classes-mirrors:
``mirrors.bbclass``
diff --git a/documentation/ref-manual/qa-checks.rst b/documentation/ref-manual/qa-checks.rst
index 4a02e7206a..1e5fe21b02 100644
--- a/documentation/ref-manual/qa-checks.rst
+++ b/documentation/ref-manual/qa-checks.rst
@@ -590,7 +590,7 @@ Errors and Warnings
- ``package contains desktop file with key 'MimeType' but does not inhert mime-xdg: <packagename> path '<file>' [mime-xdg]``
The specified package contains a .desktop file with a 'MimeType' key
- present, but does not inherit the :ref:`ref-classes-mime-xdg`
+ present, but does not inherit the :ref:`mime-xdg <ref-classes-mime-xdg>`
class that is required in order for that to be activated. Either add
``inherit mime`` to the recipe or remove the files at the
:ref:`ref-tasks-install` step if they are not needed.
diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst
index a043d20494..6fa400a574 100644
--- a/documentation/ref-manual/variables.rst
+++ b/documentation/ref-manual/variables.rst
@@ -4852,6 +4852,13 @@ system and gives an overview of their function and contents.
The revision currently checked out for the OpenEmbedded-Core layer (path
determined by :term:`COREBASE`).
+ :term:`MIME_XDG_PACKAGES`
+ The current implementation of the :ref:`mime-xdg <ref-classes-mime-xdg>`
+ class cannot detect ``.desktop`` files installed through absolute
+ symbolic links. Use this setting to make the class create post-install
+ and post-remove scripts for these packages anyway, to invoke the
+ ``update-destop-database`` command.
+
:term:`MIRRORS`
Specifies additional paths from which the OpenEmbedded build system
gets source code. When the build system searches for source code, it
--
2.34.1
next prev parent reply other threads:[~2023-09-20 8:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-20 8:15 [kirkstone][PATCH 00/10] kirkstone backports michael.opdenacker
2023-09-20 8:15 ` [kirkstone][PATCH 01/10] sdk-manual: extensible.rst: align with master branch michael.opdenacker
2023-09-20 8:15 ` [kirkstone][PATCH 02/10] dev-manual: disk-space: improve wording for obsolete sstate cache files michael.opdenacker
2023-09-20 8:15 ` [kirkstone][PATCH 03/10] documentation/README: align with master michael.opdenacker
2023-09-20 8:15 ` [kirkstone][PATCH 04/10] dev-manual: new-recipe.rst fix inconsistency with contributor guide michael.opdenacker
2023-09-20 8:15 ` [kirkstone][PATCH 05/10] contributor-guide: recipe-style-guide: add Upstream-Status michael.opdenacker
2023-09-20 8:15 ` [kirkstone][PATCH 06/10] dev-manual: licenses: mention SPDX for license compliance michael.opdenacker
2023-09-20 8:15 ` [kirkstone][PATCH 07/10] template: fix typo in section header michael.opdenacker
2023-09-20 8:15 ` [kirkstone][PATCH 08/10] ref-manual: qa-checks: align with master michael.opdenacker
2023-09-20 8:15 ` michael.opdenacker [this message]
2023-09-20 8:15 ` [kirkstone][PATCH 10/10] dev-manual: licenses: update license manifest location michael.opdenacker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230920081544.1226760-10-michael.opdenacker@bootlin.com \
--to=michael.opdenacker@bootlin.com \
--cc=docs@lists.yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox