lib/oe/recipeutils: check in validate_pn() for names instead of filenames

Ensure that the user specifies just the name portion instead of a file
name with extension. (We can't just look for . since there are recipe
names such as "glib-2.0" that legitimately contain .).

(From OE-Core rev: a4c6af737811adb2bca87e3896f8710738dd255e)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Paul Eggleton
2015-11-19 14:15:55 +13:00
committed by Richard Purdie
parent 671f41e1d1
commit 21481bc17a

View File

@@ -398,6 +398,8 @@ def validate_pn(pn):
return 'Recipe name "%s" is invalid: is a reserved keyword' % pn
elif pn.startswith('pn-'):
return 'Recipe name "%s" is invalid: names starting with "pn-" are reserved' % pn
elif pn.endswith(('.bb', '.bbappend', '.bbclass', '.inc', '.conf')):
return 'Recipe name "%s" is invalid: should be just a name, not a file name' % pn
return ''