summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorOlof Johansson <olof.johansson@axis.com>2014-03-03 15:37:36 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-05 15:50:21 +0000
commitb1a75ba1d828b6f5e5b863937a0bb4683f352817 (patch)
tree26dc63417eb3ec49a41bf3bfc90419d0cba5eed5 /meta/classes
parent593aef7932d5cc204acc582758484314ba6ffbae (diff)
downloadpoky-b1a75ba1d828b6f5e5b863937a0bb4683f352817.tar.gz
sanity.bbclass: support wildcards in SANITY_TESTED_DISTROS
With this change, you can use shell like globbing expressions (as supported by Python's fnmatch) for entries in SANITY_TESTED_DISTROS. This makes it possible to say that, e.g. "all Debian 7 Wheezy releases are supported" with the entry "Debian-7.*". [YOCTO #5265] (From OE-Core rev: 1e527136e2ac274735a25b957e0391f48b18beba) Signed-off-by: Olof Johansson <olof.johansson@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/sanity.bbclass13
1 files changed, 9 insertions, 4 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index bae010d864..d79db8f800 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -246,6 +246,8 @@ def check_connectivity(d):
246 return retval 246 return retval
247 247
248def check_supported_distro(sanity_data): 248def check_supported_distro(sanity_data):
249 from fnmatch import fnmatch
250
249 tested_distros = sanity_data.getVar('SANITY_TESTED_DISTROS', True) 251 tested_distros = sanity_data.getVar('SANITY_TESTED_DISTROS', True)
250 if not tested_distros: 252 if not tested_distros:
251 return 253 return
@@ -255,12 +257,15 @@ def check_supported_distro(sanity_data):
255 except Exception: 257 except Exception:
256 distro = None 258 distro = None
257 259
258 if distro: 260 if not distro:
259 if distro not in [x.strip() for x in tested_distros.split('\\n')]:
260 bb.warn('Host distribution "%s" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.' % distro)
261 else:
262 bb.warn('Host distribution could not be determined; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.') 261 bb.warn('Host distribution could not be determined; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.')
263 262
263 for supported in [x.strip() for x in tested_distros.split('\\n')]:
264 if fnmatch(distro, supported):
265 return
266
267 bb.warn('Host distribution "%s" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.' % distro)
268
264# Checks we should only make if MACHINE is set correctly 269# Checks we should only make if MACHINE is set correctly
265def check_sanity_validmachine(sanity_data): 270def check_sanity_validmachine(sanity_data):
266 messages = "" 271 messages = ""