aboutsummaryrefslogtreecommitdiffstats
path: root/meta-ruby
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2016-06-13 15:59:39 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2016-06-13 19:06:47 +0200
commit548effebf1dc1e80c7898b92ca29b750daf403d5 (patch)
tree54f8b5a9bfde5e3250bcd6545d7ad8b0c36414e2 /meta-ruby
parent44ea80d3a3652741cefbbe02b29ed7be4696d914 (diff)
downloadmeta-openembedded-contrib-548effebf1dc1e80c7898b92ca29b750daf403d5.tar.gz
meta-openembedded-contrib-548effebf1dc1e80c7898b92ca29b750daf403d5.tar.bz2
meta-openembedded-contrib-548effebf1dc1e80c7898b92ca29b750daf403d5.zip
ruby.bbclass: Fix usage with python3
* otherwise every recipe inheriting ruby fails with: WARNING: Exception during build_dependencies for GEM_HOME WARNING: Error during finalise of /home/jenkins/oe/world/shr-core/meta-openembedded/meta-ruby/recipes-devtools/ruby/bundler_git.bb ERROR: Failure expanding variable RUBY_GEM_VERSION, expression was ${@get_rubygemsversion("/home/jenkins/oe/world/shr-core/tmp-glibc/sysroots/x86_64-linux/usr/bin")} which triggered exception TypeError: can't use a string pattern on a bytes-like object ERROR: Task 22219 (/home/jenkins/oe/world/shr-core/meta-openembedded/meta-ruby/recipes-devtools/ruby/bundler_git.bb, do_fetch) failed with exit code '1' Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-ruby')
-rw-r--r--meta-ruby/classes/ruby.bbclass6
1 files changed, 3 insertions, 3 deletions
diff --git a/meta-ruby/classes/ruby.bbclass b/meta-ruby/classes/ruby.bbclass
index ef844f2d96..1acf2e0bd2 100644
--- a/meta-ruby/classes/ruby.bbclass
+++ b/meta-ruby/classes/ruby.bbclass
@@ -18,7 +18,7 @@ def get_rubyversion(p):
if not isfile(cmd):
return found_version
- version = subprocess.Popen([cmd, "--version"], stdout=subprocess.PIPE).communicate()[0]
+ version = subprocess.Popen([cmd, "--version"], stdout=subprocess.PIPE).communicate()[0].decode("utf-8")
r = re.compile("ruby ([0-9]+\.[0-9]+\.[0-9]+)*")
m = r.match(version)
@@ -38,7 +38,7 @@ def get_rubygemslocation(p):
if not isfile(cmd):
return found_loc
- loc = subprocess.Popen([cmd, "env"], stdout=subprocess.PIPE).communicate()[0]
+ loc = subprocess.Popen([cmd, "env"], stdout=subprocess.PIPE).communicate()[0].decode("utf-8")
r = re.compile(".*\- (/usr.*/ruby/gems/.*)")
for line in loc.split('\n'):
@@ -60,7 +60,7 @@ def get_rubygemsversion(p):
if not isfile(cmd):
return found_version
- version = subprocess.Popen([cmd, "env", "gemdir"], stdout=subprocess.PIPE).communicate()[0]
+ version = subprocess.Popen([cmd, "env", "gemdir"], stdout=subprocess.PIPE).communicate()[0].decode("utf-8")
r = re.compile(".*([0-9]+\.[0-9]+\.[0-9]+)$")
m = r.match(version)