diff options
author | Joshua Lock <josh@linux.intel.com> | 2011-03-18 13:28:42 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-03-18 16:48:01 +0000 |
commit | e235357841311a4681c747cebcc5e51940aec606 (patch) | |
tree | 3496a07af189124a33ef1f53334d21e8ca65ba0f /meta/classes/sanity.bbclass | |
parent | aa51d032b1d0dee8918f508e4c4f1777d3ad3c15 (diff) | |
download | poky-e235357841311a4681c747cebcc5e51940aec606.tar.gz |
sanity.bbclass: check for duplicates in PACKAGE_ARCHS
Duplicate entries in PACKAGE_ARCHS causes problems with rootfs
generation. For example multiple architecture entries in opkg.conf
will confuse the opkg package manager.
(From OE-Core rev: 06aca3de95483e5086b0231df070bac76a6e3c19)
Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/sanity.bbclass')
-rw-r--r-- | meta/classes/sanity.bbclass | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index 6e13d2ac4d..639e1ea61a 100644 --- a/meta/classes/sanity.bbclass +++ b/meta/classes/sanity.bbclass | |||
@@ -338,6 +338,19 @@ def check_sanity(e): | |||
338 | elif oeroot.find (' ') != -1: | 338 | elif oeroot.find (' ') != -1: |
339 | messages = messages + "Error, you have a space in your POKYBASE directory path. Please move Poky to a directory which doesn't include a space." | 339 | messages = messages + "Error, you have a space in your POKYBASE directory path. Please move Poky to a directory which doesn't include a space." |
340 | 340 | ||
341 | # Check that we don't have duplicate entries in PACKAGE_ARCHS | ||
342 | pkgarchs = data.getVar('PACKAGE_ARCHS', e.data, True) | ||
343 | seen = {} | ||
344 | dups = [] | ||
345 | |||
346 | for pa in pkgarchs.split(): | ||
347 | if seen.get(pa, 0) == 1: | ||
348 | dups.append(pa) | ||
349 | else: | ||
350 | seen[pa] = 1 | ||
351 | if len(dups): | ||
352 | messages = messages + "Error, the PACKAGE_ARCHS variable contains duplicates. The following archs are listed more than once: %s" % " ".join(dups) | ||
353 | |||
341 | if messages != "": | 354 | if messages != "": |
342 | raise_sanity_error(messages) | 355 | raise_sanity_error(messages) |
343 | 356 | ||