All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joshua Lock <josh@linux.intel.com>
To: Liping Ke <liping.ke@intel.com>
Cc: yocto@yoctoproject.org
Subject: Re: [PATCH 1/1] Resend:[Image-Creator]Make bitbake server type configurable (xmlrpc, none)
Date: Thu, 28 Apr 2011 13:31:37 -0700	[thread overview]
Message-ID: <1304022697.2171.326.camel@vorpal> (raw)
In-Reply-To: <a1d0bb2c85741e8d21cefd00c7191f111664cc0a.1303968733.git.liping.ke@intel.com>

Hi Liping,

This looks good to me. Two minor typo nits below, once they're fixed I
will create a branch on poky-contrib to collect image-creator related
patches until we're ready to switch to developing against upstream
bitbake.

Thanks,
Joshua


On Thu, 2011-04-28 at 13:38 +0800, Liping Ke wrote:
> From: Liping Ke <liping.ke@intel.com>
> 
> Add -t options in bitbake for configuring server type.
> 
> Signed-off-by: Liping Ke <liping.ke@intel.com>
> ---
>  bitbake/bin/bitbake |   22 +++++++++++++++++-----
>  1 files changed, 17 insertions(+), 5 deletions(-)
> 
> diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake
> index 6d05289..2c45224 100755
> --- a/bitbake/bin/bitbake
> +++ b/bitbake/bin/bitbake
> @@ -39,8 +39,6 @@ import bb.msg
>  from bb import cooker
>  from bb import ui
>  from bb import server
> -from bb.server import none
> -#from bb.server import xmlrpc
>  
>  __version__ = "1.11.0"
>  logger = logging.getLogger("BitBake")
> @@ -71,7 +69,7 @@ def get_ui(config):
>          return getattr(module, interface).main
>      except AttributeError:
>          sys.exit("FATAL: Invalid user interface '%s' specified.\n"
> -                 "Valid interfaces: depexp, goggle, ncurses, knotty [default]." % interface)
> +                 "Valid interfaces: depexp, goggle, ncurses, hob, knotty [default]." % interface)
>  
> 
>  # Display bitbake/OE warnings via the BitBake.Warnings logger, ignoring others"""
> @@ -161,6 +159,9 @@ Default BBFILES are the .bb files in the current directory.""")
>      parser.add_option("-u", "--ui", help = "userinterface to use",
>                 action = "store", dest = "ui")
>  
> +    parser.add_option("-t", "--servertype", help = "choose which server to user, none or xmlrpc",

Can you capitalise choose please?

> +               action = "store", dest = "servertype")
> +
>      parser.add_option("", "--revisions-changed", help = "Set the exit code depending on whether upstream floating revisions have changed or not",
>                 action = "store_true", dest = "revisions_changed", default = False)
>  
> @@ -175,8 +176,19 @@ Default BBFILES are the .bb files in the current directory.""")
>      loghandler = event.LogHandler()
>      logger.addHandler(loghandler)
>  
> -    #server = bb.server.xmlrpc
> -    server = bb.server.none
> +    # Server type could be xmlrpc or none currently, if nothing is specified,
> +    # default server would be none
> +    if configuration.servertype:
> +        server_type = configuration.servertype
> +    else:
> +        server_type = 'none'
> +
> +    try:
> +        module = __import__("bb.server", fromlist = [server_type])
> +        server = getattr(module, server_type)
> +    except AttributeError:
> +        sys.exit("FATAL: Invalid server type '%s' specified.\n"
> +                 "Valid interfaces: xmlrpc [default]." % servertype)
+                 "Valid interfaces: xmlrpc, none [default]." %
servertype)

xmlrpc isn't the default, none is :-)

>  
>      # Save a logfile for cooker into the current working directory. When the
>      # server is daemonized this logfile will be truncated.


-- 
Joshua Lock
        Yocto Build System Monkey
        Intel Open Source Technology Center



  reply	other threads:[~2011-04-28 20:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-28  5:35 [PATCH 0/1] Resend:[Image-Creator]Make bitbake server type configurable (xmlrpc, none) Liping Ke
2011-04-28  5:35 ` (No subject) Liping Ke
2011-04-28 20:31   ` Joshua Lock [this message]
2011-04-29  0:23     ` [PATCH 1/1] Resend:[Image-Creator]Make bitbake server type configurable (xmlrpc, none) Ke, Liping
2011-04-29  0:22 [PATCH 0/1] " Liping Ke
2011-04-29  0:22 ` [PATCH 1/1] Resend:[Image-Creator]Make bitbake server type configurable(xmlrpc, none) Liping Ke

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=1304022697.2171.326.camel@vorpal \
    --to=josh@linux.intel.com \
    --cc=liping.ke@intel.com \
    --cc=yocto@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.