mirror of
https://git.yoctoproject.org/poky
synced 2026-05-09 17:39:31 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
7561eb32a0
commit
392ba004f4
@@ -9057,6 +9057,9 @@
|
|||||||
<listitem><para>
|
<listitem><para>
|
||||||
<link linkend='creating-node-package-manager-npm-packages'>Creating node package manager (NPM) packages</link>
|
<link linkend='creating-node-package-manager-npm-packages'>Creating node package manager (NPM) packages</link>
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
|
<link linkend='adding-custom-metadata-to-packages'>Adding custom metadata to packages</link>
|
||||||
|
</para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -10761,6 +10764,61 @@
|
|||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<section id='adding-custom-metadata-to-packages'>
|
||||||
|
<title>Adding custom metadata to packages</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The variable <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_ADD_METADATA'><filename>PACKAGE_ADD_METADATA</filename></ulink>
|
||||||
|
can be used to add additional metadata to packages. This is
|
||||||
|
reflected in the package control/spec file. To take the ipk
|
||||||
|
format for example, the CONTROL file stored inside would
|
||||||
|
contain the additional metadata as additional lines.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The variable can be used in multiple ways, including using
|
||||||
|
suffixes to set it for a specific package type and/or package.
|
||||||
|
Note that the order of precedence is the same as this list:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para>
|
||||||
|
<filename>PACKAGE_ADD_METADATA_<PKGTYPE>_<PN></filename>
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
|
<filename>PACKAGE_ADD_METADATA_<PKGTYPE></filename>
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
|
<filename>PACKAGE_ADD_METADATA_<PN></filename>
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
|
<filename>PACKAGE_ADD_METADATA</filename>
|
||||||
|
</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
<PKGTYPE> is a parameter and expected to be a
|
||||||
|
distinct name of specific package type:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para>IPK for .ipk packages</para></listitem>
|
||||||
|
<listitem><para>DEB for .deb packages</para></listitem>
|
||||||
|
<listitem><para>RPM for .rpm packages</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
<PN> is a parameter and expected to be a package name.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The variable can contain multiple [one-line] metadata fields
|
||||||
|
separated by the literal sequence '\n'. The separator can be
|
||||||
|
redefined using the variable flag <filename>separator</filename>.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The following is an example that adds two custom fields for
|
||||||
|
ipk packages:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
PACKAGE_ADD_METADATA_IPK = "Vendor: CustomIpk\nGroup: Applications/Spreadsheets"
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='efficiently-fetching-source-files-during-a-build'>
|
<section id='efficiently-fetching-source-files-during-a-build'>
|
||||||
|
|||||||
@@ -9539,6 +9539,40 @@
|
|||||||
</glossdef>
|
</glossdef>
|
||||||
</glossentry>
|
</glossentry>
|
||||||
|
|
||||||
|
<glossentry id='var-PACKAGE_ADD_METADATA'><glossterm>PACKAGE_ADD_METADATA</glossterm>
|
||||||
|
<info>
|
||||||
|
PACKAGE_ADD_METADATA[doc] = "This variable defines additional metadata to add to packages."
|
||||||
|
</info>
|
||||||
|
<glossdef>
|
||||||
|
<para role="glossdeffirst">
|
||||||
|
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
|
||||||
|
This variable defines additional metdata to add to packages.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
You may find you need to inject additional metadata into
|
||||||
|
packages. This variable allows you to do that by setting
|
||||||
|
the injected data as the value. Multiple fields can be
|
||||||
|
added by splitting the content with the literal separator
|
||||||
|
"\n".
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The suffixes '_IPK', '_DEB', or '_RPM' can be applied to
|
||||||
|
the variable to do package type specific settings. It can
|
||||||
|
also be made package specific by using the package name as
|
||||||
|
a suffix.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
You can find out more about applying this variable in
|
||||||
|
the
|
||||||
|
"<ulink url='&YOCTO_DOCS_DEV_URL;#adding-custom-metadata-to-packages'>Adding custom metadata to packages</ulink>"
|
||||||
|
section in the Yocto Project Development Tasks Manual.
|
||||||
|
</para>
|
||||||
|
</glossdef>
|
||||||
|
</glossentry>
|
||||||
|
|
||||||
<glossentry id='var-PACKAGE_ARCH'><glossterm>PACKAGE_ARCH</glossterm>
|
<glossentry id='var-PACKAGE_ARCH'><glossterm>PACKAGE_ARCH</glossterm>
|
||||||
<info>
|
<info>
|
||||||
PACKAGE_ARCH[doc] = "The architecture of the resulting package or packages."
|
PACKAGE_ARCH[doc] = "The architecture of the resulting package or packages."
|
||||||
|
|||||||
Reference in New Issue
Block a user