summaryrefslogtreecommitdiffstats
path: root/scripts/lib/recipetool/create.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-01-07 00:15:49 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-11 15:41:46 +0000
commit1e503c0a517b1595e6de2bceceee025940f38580 (patch)
treefd064aad2309be317517ce9689a2811619091df1 /scripts/lib/recipetool/create.py
parent4deed2533056052fc898d7158a4a7491213a35c0 (diff)
downloadpoky-1e503c0a517b1595e6de2bceceee025940f38580.tar.gz
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. (From OE-Core rev: 64986decbc11afa0d1e11251f5f7adcba1860d19) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/recipetool/create.py')
-rw-r--r--scripts/lib/recipetool/create.py4
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):
90 """Determine name and version from a filename""" 90 """Determine name and version from a filename"""
91 part = '' 91 part = ''
92 if '.tar.' in srcfile: 92 if '.tar.' in srcfile:
93 namepart = srcfile.split('.tar.')[0] 93 namepart = srcfile.split('.tar.')[0].lower()
94 else: 94 else:
95 namepart = os.path.splitext(srcfile)[0] 95 namepart = os.path.splitext(srcfile)[0].lower()
96 splitval = namepart.rsplit('_', 1) 96 splitval = namepart.rsplit('_', 1)
97 if len(splitval) == 1: 97 if len(splitval) == 1:
98 splitval = namepart.rsplit('-', 1) 98 splitval = namepart.rsplit('-', 1)