summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-09-19 08:08:12 +1200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-20 15:11:07 +0100
commitce1904a1602de203293f901fe947d18105c5a1b0 (patch)
tree31b29031ed645264117cf7df2c7b7723701e29e2 /meta
parent90f925cd41a372c839289b25f1f55490c77f4dd7 (diff)
downloadpoky-ce1904a1602de203293f901fe947d18105c5a1b0.tar.gz
lib/oe/recipeutils: fix invalid character detection in validate_pn()
* validate_pn() is supposed to protect against invalid characters, fix the function so that it actually does (unanchored regex strikes again...) * However, now that the function is enforcing the restrictions, we do still want to allow + in recipe names (e.g. "gtk+") (From OE-Core rev: c5d5a1baf98a11676537fb5e9f8ec4409e30c1fd) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oe/recipeutils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py
index a0d78dde46..58e4028aed 100644
--- a/meta/lib/oe/recipeutils.py
+++ b/meta/lib/oe/recipeutils.py
@@ -449,8 +449,8 @@ def get_recipe_patched_files(d):
449def validate_pn(pn): 449def validate_pn(pn):
450 """Perform validation on a recipe name (PN) for a new recipe.""" 450 """Perform validation on a recipe name (PN) for a new recipe."""
451 reserved_names = ['forcevariable', 'append', 'prepend', 'remove'] 451 reserved_names = ['forcevariable', 'append', 'prepend', 'remove']
452 if not re.match('[0-9a-z-.]+', pn): 452 if not re.match('^[0-9a-z-.+]+$', pn):
453 return 'Recipe name "%s" is invalid: only characters 0-9, a-z, - and . are allowed' % pn 453 return 'Recipe name "%s" is invalid: only characters 0-9, a-z, -, + and . are allowed' % pn
454 elif pn in reserved_names: 454 elif pn in reserved_names:
455 return 'Recipe name "%s" is invalid: is a reserved keyword' % pn 455 return 'Recipe name "%s" is invalid: is a reserved keyword' % pn
456 elif pn.startswith('pn-'): 456 elif pn.startswith('pn-'):