From 2a7052e8ff65911ea1490b876e2faa4ae4552342 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Fri, 15 May 2015 19:12:41 +0200 Subject: [PATCH] doc: small snippet about operating system elements Add a small documentation paragraph about the operating system elements, what they are required to provide (and thus what other elements can rely on). This makes DISTRO_NAME a prime-class variable, which can now be assumed to always exists (it was de-facto required so far). Change-Id: Iffbc69de0516b58bfde48e87cd73073428d66b05 --- doc/source/developer/developing_elements.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/doc/source/developer/developing_elements.rst b/doc/source/developer/developing_elements.rst index 2b48e782..1ce40032 100644 --- a/doc/source/developer/developing_elements.rst +++ b/doc/source/developer/developing_elements.rst @@ -134,7 +134,19 @@ Each element can use the following files to define or affect dependencies: on element B and element C includes element B in its "element-provides" file and A and C are included when building an image, then B is not used. +Operating system elements +^^^^^^^^^^^^^^^^^^^^^^^^^ +Some elements define the base structure for an operating system -- for example, +the ``opensuse`` element builds a base openSUSE system. Such elements have +more requirements than the other elements: + +* they must have ``operating-system`` in their element-provides, so this + indicates they are an "operating system". + +* they must export the ``DISTRO_NAME`` environment variable with the name + of the distribution built, using an environment.d script. For example, + the ``opensuse`` element exports ``DISTRO_NAME=opensuse``. Ramdisk Elements ^^^^^^^^^^^^^^^^