diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2016-01-07 00:15:49 +1300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-01-11 15:41:06 +0000 |
commit | 64986decbc11afa0d1e11251f5f7adcba1860d19 (patch) | |
tree | 6dc3058964e63a46debf5a611efcb38884f0b4f7 | |
parent | 0bba4b5afd2ce2c3a79445eee886979a77f1a4d8 (diff) | |
download | openembedded-core-64986decbc11afa0d1e11251f5f7adcba1860d19.tar.gz openembedded-core-64986decbc11afa0d1e11251f5f7adcba1860d19.tar.bz2 openembedded-core-64986decbc11afa0d1e11251f5f7adcba1860d19.zip |
recipetool: create: lower case name when determining from filename
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@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | scripts/lib/recipetool/create.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py index 873b7ddcc6..f3428577b9 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) |