aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2016-05-18 19:24:14 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-22 16:11:14 +0100
commite7b5bd2ba11118f8220b915a44bfff7c9c39ca95 (patch)
treee492b7740e614853145003c3a29c1b41ca7e96e1 /meta/classes
parent96b1eb4e6d0795455fca77eb06ec45e43902e690 (diff)
downloadopenembedded-core-contrib-e7b5bd2ba11118f8220b915a44bfff7c9c39ca95.tar.gz
image.bbclass: support duplicate compression types
When a derived distro adds a certain type, say zip, to COMPRESSIONTYPES and later OE-core does the same, we end up with the type being listed twice, and that would have undesired effects (commands generated twice). So to support such loosely coupled extension, we de-duplicated the list of types first. Alternatively, such a situation could also be treated as error. But that seems unnecessary because typically commands for the same type will also do the same thing. (From OE-Core rev: 85855af359c2c3bfc1eaa942c95f1f7d7cc6698e) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/image.bbclass10
1 files changed, 9 insertions, 1 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 6b9f9798db..0e81b4e7e0 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -297,7 +297,15 @@ python setup_debugfs () {
python () {
vardeps = set()
- ctypes = d.getVar('COMPRESSIONTYPES', True).split()
+ # We allow COMPRESSIONTYPES to have duplicates. That avoids breaking
+ # derived distros when OE-core or some other layer independently adds
+ # the same type. There is still only one command for each type, but
+ # presumably the commands will do the same when the type is the same,
+ # even when added in different places.
+ #
+ # Without de-duplication, gen_conversion_cmds() below
+ # would create the same compression command multiple times.
+ ctypes = set(d.getVar('COMPRESSIONTYPES', True).split())
old_overrides = d.getVar('OVERRIDES', 0)
def _image_base_type(type):