diff options
author | Constantin Musca <constantinx.musca@intel.com> | 2012-11-13 17:51:00 +0200 |
---|---|---|
committer | Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> | 2012-11-29 12:00:33 +0100 |
commit | 0444ad92ec320e98c5680b712cd80234968fc519 (patch) | |
tree | 6117a998ee6f7151e4ea914d8f9439ec88f124ff /meta | |
parent | 5f4b5b70763448fc8159190bdd0342e4fc162eb8 (diff) | |
download | openembedded-core-contrib-0444ad92ec320e98c5680b712cd80234968fc519.tar.gz |
insane.bbclass: add qa package name check
Check if package names match the [a-z0-9.+-]+ regular
expression
[YOCTO #3139]
Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/insane.bbclass | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index 34bcd98e8d..237ee823fd 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass @@ -781,6 +781,9 @@ python do_package_qa () { return testmatrix = d.getVarFlags("QAPATHTEST") + import re + # The package name matches the [a-z0-9.+-]+ regular expression + pkgname_pattern = re.compile("^[a-z0-9.+-]+$") g = globals() walk_sane = True @@ -804,6 +807,11 @@ python do_package_qa () { errorchecks.append(g[testmatrix[e]]) bb.note("Checking Package: %s" % package) + # Check package name + if not pkgname_pattern.match(package): + package_qa_handle_error("pkgname", + "%s doesn't match the [a-z0-9.+-]+ regex\n" % package, d) + path = "%s/%s" % (pkgdest, package) if not package_qa_walk(path, warnchecks, errorchecks, skip, package, d): walk_sane = False |