diskimage-builder/doc/source
Ian Wienand 274be6de55 Making element overriding explicit
This is a re-factor of element_dependencies to achieve two things --
centralising override policy and storing path names.

Firstly we want to make the override policy for elements completely
explicit.  Currently, elements that wish to copy parts of other
elements walk ELEMENTS_PATH themselves and look for elements in
IMAGE_ELEMENT.  How they handle duplicate elements can differ, leading
to inconsistent behaviour.

We introduce logic in element-info to find elements in each of the
directories in ELEMENT_PATHS in *reverse* order -- that is to say,
earlier entries in the paths will overwrite later ones.

For example

 ELEMENT_PATHS=foo:bar:baz

will mean that "foo/element" will override "baz/element", since "foo"
is first.  This should be sane to anyone familiar with $PATH.
Documentation is clarified around this point and a test-case is added.

The second thing is that we want to keep the complete path of the
elements we have chosen.  We want the aforementioned elements that
walk the element list to use these canonical paths to pickup files;
this way they don't need to make local decisions about element
overrides, but can simply iterate a list and copy/merge files if they
exist.

A follow-on change (I7092e1845942f249175933d67ab121188f3511fd) will
expose this data in a separate variable that can be parsed by elements
(a further follow-on I0a64b45e9f2cfa28e84b2859d76b065a6c4590f0
modifies the elements to use this information).  Thus this does not
change the status-quo -- elements that are walking ELEMENTS_PATH
themselves and can/will continue doing that.

Change-Id: I2a29861c67de2d25c595cb35d850e92807d26ac6
2016-09-08 10:58:19 +10:00
..
developer Making element overriding explicit 2016-09-08 10:58:19 +10:00
user_guide Revert "Zerofree the image if possible" 2016-03-10 20:38:01 +00:00
ci.md typos on the document 2015-07-23 11:56:30 +00:00
conf.py Merge "Fix sphinx-build to not depend on diskimage-builder" 2016-06-28 08:34:05 +00:00
copyright.rst Turn docs warnings into errors and fix issues 2015-04-27 15:03:19 +00:00
elements Create docs site containing element READMEs 2015-02-10 11:45:35 -08:00
elements.rst Split out README into separate files 2015-02-24 15:32:02 -08:00
index.rst Add blurb about communication to docs landing page 2016-08-15 08:42:56 -07:00