diff options
author | Constantin Musca <constantinx.musca@intel.com> | 2012-11-13 17:51:00 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-11-18 16:42:08 +0000 |
commit | 86204fbc69197ac113a5c8429a6c330bad560cee (patch) | |
tree | 7e5fc97252ae96ddc2a839e3895052edd839ed21 /meta | |
parent | 2c826699882d2b7ce7f2c4e702a49e61e45deda7 (diff) | |
download | poky-86204fbc69197ac113a5c8429a6c330bad560cee.tar.gz |
insane.bbclass: add qa package name check
Check if package names match the [a-z0-9.+-]+ regular
expression
[YOCTO #3139]
(From OE-Core rev: 55dd271be1aee21e36d130359f4f21841623c425)
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 () { | |||
781 | return | 781 | return |
782 | 782 | ||
783 | testmatrix = d.getVarFlags("QAPATHTEST") | 783 | testmatrix = d.getVarFlags("QAPATHTEST") |
784 | import re | ||
785 | # The package name matches the [a-z0-9.+-]+ regular expression | ||
786 | pkgname_pattern = re.compile("^[a-z0-9.+-]+$") | ||
784 | 787 | ||
785 | g = globals() | 788 | g = globals() |
786 | walk_sane = True | 789 | walk_sane = True |
@@ -804,6 +807,11 @@ python do_package_qa () { | |||
804 | errorchecks.append(g[testmatrix[e]]) | 807 | errorchecks.append(g[testmatrix[e]]) |
805 | 808 | ||
806 | bb.note("Checking Package: %s" % package) | 809 | bb.note("Checking Package: %s" % package) |
810 | # Check package name | ||
811 | if not pkgname_pattern.match(package): | ||
812 | package_qa_handle_error("pkgname", | ||
813 | "%s doesn't match the [a-z0-9.+-]+ regex\n" % package, d) | ||
814 | |||
807 | path = "%s/%s" % (pkgdest, package) | 815 | path = "%s/%s" % (pkgdest, package) |
808 | if not package_qa_walk(path, warnchecks, errorchecks, skip, package, d): | 816 | if not package_qa_walk(path, warnchecks, errorchecks, skip, package, d): |
809 | walk_sane = False | 817 | walk_sane = False |