diff options
| author | Michael Opdenacker <michael.opdenacker@bootlin.com> | 2022-10-31 14:18:30 +0100 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2023-09-23 05:26:16 -1000 |
| commit | 3fde5d606b07ca1824a5fc452d71b0bbacc3e7df (patch) | |
| tree | 65eca2f592dca7f98e0af29721d91e5e6c22de90 | |
| parent | 870c6a73a732a474f307d7829b1947a5887e4d1d (diff) | |
| download | poky-3fde5d606b07ca1824a5fc452d71b0bbacc3e7df.tar.gz | |
manuals: document "mime-xdg" class and MIME_XDG_PACKAGES
(From yocto-docs rev: 4415d95358497b23f0a7b10f9ee31203ccc01eff)
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
| -rw-r--r-- | documentation/migration-guides/migration-3.1.rst | 2 | ||||
| -rw-r--r-- | documentation/ref-manual/classes.rst | 21 | ||||
| -rw-r--r-- | documentation/ref-manual/qa-checks.rst | 2 | ||||
| -rw-r--r-- | 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 | |||
| 238 | circumstances: | 238 | circumstances: |
| 239 | 239 | ||
| 240 | - A recipe installs ``.desktop`` files containing ``MimeType`` keys but | 240 | - A recipe installs ``.desktop`` files containing ``MimeType`` keys but |
| 241 | does not inherit the new ``mime-xdg`` class | 241 | does not inherit the new :ref:`mime-xdg <ref-classes-mime-xdg>` class |
| 242 | 242 | ||
| 243 | - A recipe installs ``.xml`` files into ``${datadir}/mime/packages`` | 243 | - A recipe installs ``.xml`` files into ``${datadir}/mime/packages`` |
| 244 | but does not inherit the :ref:`mime <ref-classes-mime>` class | 244 | 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 | |||
| 1577 | These scriptlets call ``update-mime-database`` to add the MIME types to | 1577 | These scriptlets call ``update-mime-database`` to add the MIME types to |
| 1578 | the shared database. | 1578 | the shared database. |
| 1579 | 1579 | ||
| 1580 | .. _ref-classes-mime-xdg: | ||
| 1581 | |||
| 1582 | ``mime-xdg.bbclass`` | ||
| 1583 | ==================== | ||
| 1584 | |||
| 1585 | The :ref:`mime-xdg <ref-classes-mime-xdg>` class generates the proper | ||
| 1586 | post-install and post-remove (postinst/postrm) scriptlets for packages | ||
| 1587 | that install ``.desktop`` files containing ``MimeType`` entries. | ||
| 1588 | These scriptlets call ``update-desktop-database`` to add the MIME types | ||
| 1589 | to the database of MIME types handled by desktop files. | ||
| 1590 | |||
| 1591 | Thanks to this class, when users open a file through a file browser | ||
| 1592 | on recently created images, they don't have to choose the application | ||
| 1593 | to open the file from the pool of all known applications, even the ones | ||
| 1594 | that cannot open the selected file. | ||
| 1595 | |||
| 1596 | If you have recipes installing their ``.desktop`` files as absolute | ||
| 1597 | symbolic links, the detection of such files cannot be done by the current | ||
| 1598 | implementation of this class. In this case, you have to add the corresponding | ||
| 1599 | package names to the :term:`MIME_XDG_PACKAGES` variable. | ||
| 1600 | |||
| 1580 | .. _ref-classes-mirrors: | 1601 | .. _ref-classes-mirrors: |
| 1581 | 1602 | ||
| 1582 | ``mirrors.bbclass`` | 1603 | ``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 | |||
| 590 | - ``package contains desktop file with key 'MimeType' but does not inhert mime-xdg: <packagename> path '<file>' [mime-xdg]`` | 590 | - ``package contains desktop file with key 'MimeType' but does not inhert mime-xdg: <packagename> path '<file>' [mime-xdg]`` |
| 591 | 591 | ||
| 592 | The specified package contains a .desktop file with a 'MimeType' key | 592 | The specified package contains a .desktop file with a 'MimeType' key |
| 593 | present, but does not inherit the :ref:`ref-classes-mime-xdg` | 593 | present, but does not inherit the :ref:`mime-xdg <ref-classes-mime-xdg>` |
| 594 | class that is required in order for that to be activated. Either add | 594 | class that is required in order for that to be activated. Either add |
| 595 | ``inherit mime`` to the recipe or remove the files at the | 595 | ``inherit mime`` to the recipe or remove the files at the |
| 596 | :ref:`ref-tasks-install` step if they are not needed. | 596 | :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. | |||
| 4852 | The revision currently checked out for the OpenEmbedded-Core layer (path | 4852 | The revision currently checked out for the OpenEmbedded-Core layer (path |
| 4853 | determined by :term:`COREBASE`). | 4853 | determined by :term:`COREBASE`). |
| 4854 | 4854 | ||
| 4855 | :term:`MIME_XDG_PACKAGES` | ||
| 4856 | The current implementation of the :ref:`mime-xdg <ref-classes-mime-xdg>` | ||
| 4857 | class cannot detect ``.desktop`` files installed through absolute | ||
| 4858 | symbolic links. Use this setting to make the class create post-install | ||
| 4859 | and post-remove scripts for these packages anyway, to invoke the | ||
| 4860 | ``update-destop-database`` command. | ||
| 4861 | |||
| 4855 | :term:`MIRRORS` | 4862 | :term:`MIRRORS` |
| 4856 | Specifies additional paths from which the OpenEmbedded build system | 4863 | Specifies additional paths from which the OpenEmbedded build system |
| 4857 | gets source code. When the build system searches for source code, it | 4864 | gets source code. When the build system searches for source code, it |
