diff options
Diffstat (limited to 'scripts/lib/recipetool')
-rw-r--r-- | scripts/lib/recipetool/append.py | 4 | ||||
-rw-r--r-- | scripts/lib/recipetool/create.py | 4 | ||||
-rw-r--r-- | scripts/lib/recipetool/create_buildsys_python.py | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/scripts/lib/recipetool/append.py b/scripts/lib/recipetool/append.py index 35756b08af..5d73d307e0 100644 --- a/scripts/lib/recipetool/append.py +++ b/scripts/lib/recipetool/append.py | |||
@@ -90,7 +90,7 @@ def find_target_file(targetpath, d, pkglist=None): | |||
90 | if fnmatch.fnmatchcase(fullpth, targetpath): | 90 | if fnmatch.fnmatchcase(fullpth, targetpath): |
91 | recipes[targetpath].append(pn) | 91 | recipes[targetpath].append(pn) |
92 | elif line.startswith('pkg_preinst_') or line.startswith('pkg_postinst_'): | 92 | elif line.startswith('pkg_preinst_') or line.startswith('pkg_postinst_'): |
93 | scriptval = line.split(':', 1)[1].strip().decode('string_escape') | 93 | scriptval = line.split(':', 1)[1].strip().encode('utf-8').decode('unicode_escape') |
94 | if 'update-alternatives --install %s ' % targetpath in scriptval: | 94 | if 'update-alternatives --install %s ' % targetpath in scriptval: |
95 | recipes[targetpath].append('?%s' % pn) | 95 | recipes[targetpath].append('?%s' % pn) |
96 | elif targetpath_re.search(scriptval): | 96 | elif targetpath_re.search(scriptval): |
@@ -172,7 +172,7 @@ def get_source_path(cmdelements): | |||
172 | """Find the source path specified within a command""" | 172 | """Find the source path specified within a command""" |
173 | command = cmdelements[0] | 173 | command = cmdelements[0] |
174 | if command in ['install', 'cp']: | 174 | if command in ['install', 'cp']: |
175 | helptext = subprocess.check_output('LC_ALL=C %s --help' % command, shell=True) | 175 | helptext = subprocess.check_output('LC_ALL=C %s --help' % command, shell=True).decode('utf-8') |
176 | argopts = '' | 176 | argopts = '' |
177 | argopt_line_re = re.compile('^-([a-zA-Z0-9]), --[a-z-]+=') | 177 | argopt_line_re = re.compile('^-([a-zA-Z0-9]), --[a-z-]+=') |
178 | for line in helptext.splitlines(): | 178 | for line in helptext.splitlines(): |
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py index e3e01e385a..744ff1b0ab 100644 --- a/scripts/lib/recipetool/create.py +++ b/scripts/lib/recipetool/create.py | |||
@@ -851,14 +851,14 @@ def crunch_license(licfile): | |||
851 | continue | 851 | continue |
852 | # Squash spaces, and replace smart quotes, double quotes | 852 | # Squash spaces, and replace smart quotes, double quotes |
853 | # and backticks with single quotes | 853 | # and backticks with single quotes |
854 | line = oe.utils.squashspaces(line.strip()).decode("utf-8") | 854 | line = oe.utils.squashspaces(line.strip()) |
855 | line = line.replace(u"\u2018", "'").replace(u"\u2019", "'").replace(u"\u201c","'").replace(u"\u201d", "'").replace('"', '\'').replace('`', '\'') | 855 | line = line.replace(u"\u2018", "'").replace(u"\u2019", "'").replace(u"\u201c","'").replace(u"\u201d", "'").replace('"', '\'').replace('`', '\'') |
856 | if line: | 856 | if line: |
857 | lictext.append(line) | 857 | lictext.append(line) |
858 | 858 | ||
859 | m = hashlib.md5() | 859 | m = hashlib.md5() |
860 | try: | 860 | try: |
861 | m.update(' '.join(lictext)) | 861 | m.update(' '.join(lictext).encode('utf-8')) |
862 | md5val = m.hexdigest() | 862 | md5val = m.hexdigest() |
863 | except UnicodeEncodeError: | 863 | except UnicodeEncodeError: |
864 | md5val = None | 864 | md5val = None |
diff --git a/scripts/lib/recipetool/create_buildsys_python.py b/scripts/lib/recipetool/create_buildsys_python.py index 5cbea2abba..55cce0e942 100644 --- a/scripts/lib/recipetool/create_buildsys_python.py +++ b/scripts/lib/recipetool/create_buildsys_python.py | |||
@@ -516,7 +516,7 @@ class PythonRecipeHandler(RecipeHandler): | |||
516 | except (OSError, subprocess.CalledProcessError): | 516 | except (OSError, subprocess.CalledProcessError): |
517 | pass | 517 | pass |
518 | else: | 518 | else: |
519 | for line in dep_output.splitlines(): | 519 | for line in dep_output.decode('utf-8').splitlines(): |
520 | line = line.rstrip() | 520 | line = line.rstrip() |
521 | dep, filename = line.split('\t', 1) | 521 | dep, filename = line.split('\t', 1) |
522 | if filename.endswith('/setup.py'): | 522 | if filename.endswith('/setup.py'): |