All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Dongxiao Xu <dongxiao.xu@intel.com>
Cc: bitbake-devel@lists.openembedded.org
Subject: Re: [PATCH 5/8] bitbake: add -B option to bind with interface
Date: Wed, 11 Jan 2012 11:38:06 +0000	[thread overview]
Message-ID: <1326281886.23315.23.camel@ted> (raw)
In-Reply-To: <2b70816adeae4c278747d52654f3184f5e5a15a3.1326249301.git.dongxiao.xu@intel.com>

On Wed, 2012-01-11 at 11:03 +0800, Dongxiao Xu wrote:
> When start bitbake as a server only process, we need to assign certain
> interface to it.
> 
> Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
> ---
>  bin/bitbake             |   15 ++++++++++-----
>  lib/bb/server/xmlrpc.py |    6 +++---
>  2 files changed, 13 insertions(+), 8 deletions(-)
> 
> diff --git a/bin/bitbake b/bin/bitbake
> index c2e6822..6e661ce 100755
> --- a/bin/bitbake
> +++ b/bin/bitbake
> @@ -168,6 +168,8 @@ Default BBFILES are the .bb files in the current directory.""")
>      parser.add_option("", "--server-only", help = "Run bitbake without UI,  the frontend can connect with bitbake server itself",
>                 action = "store_true", dest = "server_only", default = False)
>  
> +    parser.add_option("-B", "--bind", help = "The name/address for the bitbake server to bind to",
> +               action = "store", dest = "bind", default = False)
>      options, args = parser.parse_args(sys.argv)
>  
>      configuration = BBConfiguration(options)
> @@ -189,9 +191,6 @@ Default BBFILES are the .bb files in the current directory.""")
>          sys.exit("FATAL: Invalid server type '%s' specified.\n"
>                   "Valid interfaces: xmlrpc, process [default], none." % servertype)
>  
> -    if configuration.server_only and configuration.servertype != "xmlrpc":
> -        sys.exit("FATAL: If '--server-only' is defined, we must set the servertype as 'xmlrpc'.\n")
> -
>      # Save a logfile for cooker into the current working directory. When the
>      # server is daemonized this logfile will be truncated.
>      cooker_logfile = os.path.join(os.getcwd(), "cooker.log")
> @@ -211,9 +210,15 @@ Default BBFILES are the .bb files in the current directory.""")
>      # of the UIs (e.g. for DISPLAY, etc.)
>      bb.utils.clean_environment()
>  
> -    server = server.BitBakeServer()
> +    if configuration.server_only:
> +        if configuration.servertype != "xmlrpc":
> +            sys.exit("FATAL: If '--server-only' is defined, we must set the servertype as 'xmlrpc'.\n")
> +        server = server.BitBakeServer()
> +        server.initServer((configuration.bind, 0))
> +    else:
> +        server = server.BitBakeServer()
> +        server.initServer()

This looks like it will silently ignore configuration.bind in the non
server-only case. Don't you need something like:


+    if configuration.server_only:
+        if configuration.servertype != "xmlrpc":
+            sys.exit("FATAL: If '--server-only' is defined, we must set the servertype as 'xmlrpc'.\n")
+        server = server.BitBakeServer()
+        server.initServer((configuration.bind, 0))
+    elif configuration.bind:
+        server = server.BitBakeServer()
+        server.initServer((configuration.bind, 0))
+    else:
+        server = server.BitBakeServer()
+        server.initServer()

?

Cheers,

Richard





  reply	other threads:[~2012-01-11 11:45 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-11  3:03 [PATCH 0/8 v2][PULL] Hob: bitbake related changes Dongxiao Xu
2012-01-11  3:03 ` [PATCH 1/8] cache: Use configuration's hash value to validate cache Dongxiao Xu
2012-01-11  3:03 ` [PATCH 2/8] command.py: add resolve option for generateTargetsTree API Dongxiao Xu
2012-01-11  3:03 ` [PATCH 3/8] event.py: Add a new event PackageInfo Dongxiao Xu
2012-01-11  3:03 ` [PATCH 4/8] Bitbake: change for adding progress bar in Hob2 Dongxiao Xu
2012-01-11  3:03 ` [PATCH 5/8] bitbake: add -B option to bind with interface Dongxiao Xu
2012-01-11 11:38   ` Richard Purdie [this message]
2012-01-11 13:30     ` Xu, Dongxiao
2012-01-11 14:29       ` Richard Purdie
2012-01-11  3:03 ` [PATCH 6/8] bitbake: Add client socket info for BitBakeServerConnection Dongxiao Xu
2012-01-11  3:03 ` [PATCH 7/8] command.py: add new command to get the CPU info Dongxiao Xu
2012-01-11 11:34   ` Richard Purdie
2012-01-11 11:52     ` Wang, Shane
2012-01-11 12:02       ` Wang, Shane
2012-01-11 13:24       ` Richard Purdie
2012-01-11  3:03 ` [PATCH 8/8] runqueue: fire sceneQueueTaskStarted event when a setscene queue starts Dongxiao Xu

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=1326281886.23315.23.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=dongxiao.xu@intel.com \
    /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.