diff options
| author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2016-06-07 09:36:22 -0400 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2016-06-07 09:40:46 -0400 |
| commit | e2e920747f0bb3b41def94c7c462fa908aebd9b2 (patch) | |
| tree | 7ca9cd0367f4e8407730e1ccdca2b151f8f6d35b /classes | |
| parent | 7a513734347e9969fb5caddab0b31910f46dbfb0 (diff) | |
| download | meta-cloud-services-e2e920747f0bb3b41def94c7c462fa908aebd9b2.tar.gz | |
ruby: fix TypeError exception triggered by python3
The error appears as follows:
ERROR: Failure expanding variable RUBY_GEM_VERSION, expression was
${@get_rubygemsversion("build/tmp/sysroots/x86_64-linux/usr/bin")}
which triggered exception TypeError: can't use a string pattern on
a bytes-like object
Adding an explicit utf-8 decode makes it work again.
Similar fixes appear in git://git.pokylinux.org/poky 3e309e0aad
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'classes')
| -rw-r--r-- | classes/ruby.bbclass | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/classes/ruby.bbclass b/classes/ruby.bbclass index 92226f6..bc82ca9 100644 --- a/classes/ruby.bbclass +++ b/classes/ruby.bbclass | |||
| @@ -66,7 +66,7 @@ def get_rubygemsversion(p): | |||
| 66 | version = subprocess.Popen([cmd, "env", "gemdir"], stdout=subprocess.PIPE).communicate()[0] | 66 | version = subprocess.Popen([cmd, "env", "gemdir"], stdout=subprocess.PIPE).communicate()[0] |
| 67 | 67 | ||
| 68 | r = re.compile(".*([0-9]+\.[0-9]+\.[0-9]+)$") | 68 | r = re.compile(".*([0-9]+\.[0-9]+\.[0-9]+)$") |
| 69 | m = r.match(version) | 69 | m = r.match(version.decode("utf-8")) |
| 70 | if m: | 70 | if m: |
| 71 | found_version = m.group(1) | 71 | found_version = m.group(1) |
| 72 | 72 | ||
