From: Paul Eggleton Date: Thu, 19 Nov 2015 01:15:55 +0000 (+1300) Subject: lib/oe/recipeutils: check in validate_pn() for names instead of filenames X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~28259 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a4c6af737811adb2bca87e3896f8710738dd255e;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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 .). Signed-off-by: Paul Eggleton Signed-off-by: Ross Burton --- diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py index 119a68821ba..8918facb5b8 100644 --- a/meta/lib/oe/recipeutils.py +++ b/meta/lib/oe/recipeutils.py @@ -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 ''