[OE-core] [PATCH 08/14] recipetool: create: lower case name when determining from filename
Paul Eggleton
paul.eggleton at linux.intel.com
Wed Jan 6 11:15:49 UTC 2016
As a matter of general convention we expect recipe names to be lower
case; in fact some of the packaging backends insist upon it. Since in
this part of the code we're auto-determining the name, we should convert
the name to lowercase if it's not already so that we're following
convention and avoiding any validation issues later on.
Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
---
scripts/lib/recipetool/create.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
index 873b7dd..f342857 100644
--- a/scripts/lib/recipetool/create.py
+++ b/scripts/lib/recipetool/create.py
@@ -90,9 +90,9 @@ def determine_from_filename(srcfile):
"""Determine name and version from a filename"""
part = ''
if '.tar.' in srcfile:
- namepart = srcfile.split('.tar.')[0]
+ namepart = srcfile.split('.tar.')[0].lower()
else:
- namepart = os.path.splitext(srcfile)[0]
+ namepart = os.path.splitext(srcfile)[0].lower()
splitval = namepart.rsplit('_', 1)
if len(splitval) == 1:
splitval = namepart.rsplit('-', 1)
--
2.5.0
More information about the Openembedded-core
mailing list