From 3708e40051e59eb9e33d71d4876fd00e30a6d3d2 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Fri, 2 Aug 2013 11:04:42 +0100 Subject: [PATCH] Document the dangers of co-existing elements. Add a potent example (and simply remedy) of how element authors can unwittingly conflict with each other in ways that it is almost impossible for us to guard against with low level policy/mechanism in di-b. Fixes bug 1181309. Change-Id: I51e845065702911371e448521327143495c3b405 --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 3eb6850c..63150e97 100644 --- a/README.md +++ b/README.md @@ -162,6 +162,20 @@ Conform to the following conventions: If you do not use the DIB\_ prefix you may find that your overrides are discarded as the build environment is sanitised. +* Consider that your element co-exists with many others and try to guard + against undefined behaviours. Some examples: + + * Two elements use the source-repositories element, but use the same filename + for the source-repositories config file. Files such as these (and indeed the + scripts in the various .d directories listed below) should be named such + that they are unique. If they are not unique, when the combined tree is + created by disk-image-builder for injecting into the build environment, one + of the files will be overwritten. + + * Two elements copy different scripts into /usr/local/bin with the same name. + If they both use set -e and cp -n then the conflict will be caught and cause + the build to fail. + Make as many of the following subdirectories as you need, depending on what part of the process you need to customise: