summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
authorMichael Ho <Michael.Ho@bmw.de>2020-05-25 10:41:18 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-05-27 11:05:04 +0100
commit392ba004f42be2fd9dcf121d3dfa5b414ff83f93 (patch)
tree5d378b68bd73a068fd131721db3f6a2c3ee51357 /documentation
parent7561eb32a01f7990ad4a4606ac97ebe2a659e029 (diff)
downloadpoky-392ba004f42be2fd9dcf121d3dfa5b414ff83f93.tar.gz
ref-manual: add PACKAGE_ADD_METADATA documentation
Add a basic variable definition and a small section to the development tasks manual for using PACKAGE_ADD_METADATA to add custom metadata to packages. (From yocto-docs rev: c5e4d575a771ddd1c970389ce3ace6d6abe68769) Signed-off-by: Michael Ho <Michael.Ho@bmw.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
-rw-r--r--documentation/dev-manual/dev-manual-common-tasks.xml58
-rw-r--r--documentation/ref-manual/ref-variables.xml34
2 files changed, 92 insertions, 0 deletions
diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml
index e9ce182a59..605d1ad7ea 100644
--- a/documentation/dev-manual/dev-manual-common-tasks.xml
+++ b/documentation/dev-manual/dev-manual-common-tasks.xml
@@ -9057,6 +9057,9 @@
9057 <listitem><para> 9057 <listitem><para>
9058 <link linkend='creating-node-package-manager-npm-packages'>Creating node package manager (NPM) packages</link> 9058 <link linkend='creating-node-package-manager-npm-packages'>Creating node package manager (NPM) packages</link>
9059 </para></listitem> 9059 </para></listitem>
9060 <listitem><para>
9061 <link linkend='adding-custom-metadata-to-packages'>Adding custom metadata to packages</link>
9062 </para></listitem>
9060 </itemizedlist> 9063 </itemizedlist>
9061 </para> 9064 </para>
9062 9065
@@ -10761,6 +10764,61 @@
10761 </para> 10764 </para>
10762 </section> 10765 </section>
10763 </section> 10766 </section>
10767
10768 <section id='adding-custom-metadata-to-packages'>
10769 <title>Adding custom metadata to packages</title>
10770
10771 <para>
10772 The variable <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_ADD_METADATA'><filename>PACKAGE_ADD_METADATA</filename></ulink>
10773 can be used to add additional metadata to packages. This is
10774 reflected in the package control/spec file. To take the ipk
10775 format for example, the CONTROL file stored inside would
10776 contain the additional metadata as additional lines.
10777 </para>
10778
10779 <para>
10780 The variable can be used in multiple ways, including using
10781 suffixes to set it for a specific package type and/or package.
10782 Note that the order of precedence is the same as this list:
10783 <itemizedlist>
10784 <listitem><para>
10785 <filename>PACKAGE_ADD_METADATA_&lt;PKGTYPE&gt;_&lt;PN&gt;</filename>
10786 </para></listitem>
10787 <listitem><para>
10788 <filename>PACKAGE_ADD_METADATA_&lt;PKGTYPE&gt;</filename>
10789 </para></listitem>
10790 <listitem><para>
10791 <filename>PACKAGE_ADD_METADATA_&lt;PN&gt;</filename>
10792 </para></listitem>
10793 <listitem><para>
10794 <filename>PACKAGE_ADD_METADATA</filename>
10795 </para></listitem>
10796 </itemizedlist>
10797 &lt;PKGTYPE&gt; is a parameter and expected to be a
10798 distinct name of specific package type:
10799 <itemizedlist>
10800 <listitem><para>IPK for .ipk packages</para></listitem>
10801 <listitem><para>DEB for .deb packages</para></listitem>
10802 <listitem><para>RPM for .rpm packages</para></listitem>
10803 </itemizedlist>
10804 &lt;PN&gt; is a parameter and expected to be a package name.
10805 </para>
10806
10807 <para>
10808 The variable can contain multiple [one-line] metadata fields
10809 separated by the literal sequence '\n'. The separator can be
10810 redefined using the variable flag <filename>separator</filename>.
10811 </para>
10812
10813 <para>
10814 The following is an example that adds two custom fields for
10815 ipk packages:
10816 <literallayout class='monospaced'>
10817 PACKAGE_ADD_METADATA_IPK = "Vendor: CustomIpk\nGroup: Applications/Spreadsheets"
10818 </literallayout>
10819 </para>
10820 </section>
10821
10764 </section> 10822 </section>
10765 10823
10766 <section id='efficiently-fetching-source-files-during-a-build'> 10824 <section id='efficiently-fetching-source-files-during-a-build'>
diff --git a/documentation/ref-manual/ref-variables.xml b/documentation/ref-manual/ref-variables.xml
index 364cd09eb8..657f6cf3d2 100644
--- a/documentation/ref-manual/ref-variables.xml
+++ b/documentation/ref-manual/ref-variables.xml
@@ -9539,6 +9539,40 @@
9539 </glossdef> 9539 </glossdef>
9540 </glossentry> 9540 </glossentry>
9541 9541
9542 <glossentry id='var-PACKAGE_ADD_METADATA'><glossterm>PACKAGE_ADD_METADATA</glossterm>
9543 <info>
9544 PACKAGE_ADD_METADATA[doc] = "This variable defines additional metadata to add to packages."
9545 </info>
9546 <glossdef>
9547 <para role="glossdeffirst">
9548<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
9549 This variable defines additional metdata to add to packages.
9550 </para>
9551
9552 <para>
9553 You may find you need to inject additional metadata into
9554 packages. This variable allows you to do that by setting
9555 the injected data as the value. Multiple fields can be
9556 added by splitting the content with the literal separator
9557 "\n".
9558 </para>
9559
9560 <para>
9561 The suffixes '_IPK', '_DEB', or '_RPM' can be applied to
9562 the variable to do package type specific settings. It can
9563 also be made package specific by using the package name as
9564 a suffix.
9565 </para>
9566
9567 <para>
9568 You can find out more about applying this variable in
9569 the
9570 "<ulink url='&YOCTO_DOCS_DEV_URL;#adding-custom-metadata-to-packages'>Adding custom metadata to packages</ulink>"
9571 section in the Yocto Project Development Tasks Manual.
9572 </para>
9573 </glossdef>
9574 </glossentry>
9575
9542 <glossentry id='var-PACKAGE_ARCH'><glossterm>PACKAGE_ARCH</glossterm> 9576 <glossentry id='var-PACKAGE_ARCH'><glossterm>PACKAGE_ARCH</glossterm>
9543 <info> 9577 <info>
9544 PACKAGE_ARCH[doc] = "The architecture of the resulting package or packages." 9578 PACKAGE_ARCH[doc] = "The architecture of the resulting package or packages."