From a4c6af737811adb2bca87e3896f8710738dd255e Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Thu, 19 Nov 2015 14:15:55 +1300 Subject: 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 --- meta/lib/oe/recipeutils.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'meta/lib/oe/recipeutils.py') diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py index 119a68821b..8918facb5b 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 '' -- cgit 1.2.3-korg