All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Robert P. J. Day" <rpjday@crashcourse.ca>
To: Bruce Ashfield <bruce.ashfield@gmail.com>
Cc: meta-virtualization@lists.yoctoproject.org
Subject: Re: [meta-virtualization] what is the state of meta-cloud-services, re: chef/puppet/ruby recipes?
Date: Sat, 2 Jan 2021 15:07:27 -0500 (EST)	[thread overview]
Message-ID: <aceeb927-56eb-f93d-cdc3-9d9c3643dcdf@crashcourse.ca> (raw)
In-Reply-To: <CADkTA4Nf59A4F_JrPOtv77FK57nNEVjEvirhuegmWc=WwJzyhQ@mail.gmail.com>

On Sun, 27 Dec 2020, Bruce Ashfield wrote:

> No one has done much with the ruby support in quite some time, so it
> would need work as well. I thought there was a meta-ruby floating
> around, but I couldn't find it on the layerindex, so it looks like
> just oe-core + some work would be required.

  random thoughts after messing with various aspects of ruby for the
last couple days.

  first, would it not make sense to move the ruby.bbclass file to
oe-core? given the fundamental nature of ruby.bbclass, it seems
inappropriate to have it in a specialized layer like
meta-cloud-services. if oe-core has class files related to things like
perl and python, it would seem like ruby.bbclass belongs there as
well.

  also, i had to hack ruby.bbclass given the python 3 distinction
between strings and bytes in order to get some ruby variables to be
set properly:

diff --git a/classes/ruby.bbclass b/classes/ruby.bbclass
index 15ac9f4b..585d128d 100644
--- a/classes/ruby.bbclass
+++ b/classes/ruby.bbclass
@@ -26,7 +26,7 @@ def get_rubyversion(p):
     version = subprocess.Popen([cmd, "--version"],
stdout=subprocess.PIPE).communicate()[0]

     r = re.compile("ruby ([0-9]+\.[0-9]+\.[0-9]+)*")
-    m = r.match(version)
+    m = r.match(version.decode("utf-8"))
     if m:
         found_version = m.group(1)

@@ -44,6 +44,7 @@ def get_rubygemslocation(p):
        return found_loc

     loc = subprocess.Popen([cmd, "env"], stdout=subprocess.PIPE).communicate()[0]
+    loc = loc.decode("utf-8")

     r = re.compile(".*\- (/usr.*/ruby/gems/.*)")
     for line in loc.split('\n'):

  i'm sure there's a cleaner way to do that ... i can submit that, but
i'm not sure which ML to give it to.

  in any event, i'm still beating up on ruby, and it would be nice to
formalize how to get this organized.

rday

  parent reply	other threads:[~2021-01-02 20:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-26 18:28 what is the state of meta-cloud-services, re: chef/puppet/ruby recipes? Robert P. J. Day
2020-12-27 19:20 ` [meta-virtualization] " Bruce Ashfield
2021-01-02 14:20   ` Robert P. J. Day
2021-01-05 21:27     ` Bruce Ashfield
2021-01-02 20:07   ` Robert P. J. Day [this message]
2021-01-05 21:31     ` Bruce Ashfield

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aceeb927-56eb-f93d-cdc3-9d9c3643dcdf@crashcourse.ca \
    --to=rpjday@crashcourse.ca \
    --cc=bruce.ashfield@gmail.com \
    --cc=meta-virtualization@lists.yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.