]> code.ossystems Code Review - openembedded-core.git/commitdiff
lib/oe/recipeutils: check in validate_pn() for names instead of filenames
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Thu, 19 Nov 2015 01:15:55 +0000 (14:15 +1300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 1 Dec 2015 21:30:55 +0000 (21:30 +0000)
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 <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/lib/oe/recipeutils.py

index 119a68821baba5a8aa6bf9e39ec7b1c11c65c282..8918facb5b8d54075f065c8bd9a7f06162ec2649 100644 (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 ''