<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>3575</bug_id>
          
          <creation_ts>2012-12-12 18:33:48 +0000</creation_ts>
          <short_desc>Improve hob client communication with bitbake backend via xmlrpc</short_desc>
          <delta_ts>2013-07-10 10:30:21 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>Toaster</product>
          <component>toaster</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>1.5 M1</target_milestone>
          
          <blocked>3211</blocked>
    
    <blocked>4648</blocked>
    
    <blocked>4649</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Jessica">jessica.zhang</reporter>
          <assigned_to name="Alexandru Damian">alexandru.damian</assigned_to>
          <cc>alexandru.damian</cc>
    
    <cc>andreea.b.proca</cc>
    
    <cc>belen.barros.pena</cc>
    
    <cc>cristian.iorga</cc>
    
    <cc>mihai.lindner</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>valentin.popa</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>28199</commentid>
    <comment_count>0</comment_count>
    <who name="Jessica">jessica.zhang</who>
    <bug_when>2012-12-12 18:33:48 +0000</bug_when>
    <thetext></thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28889</commentid>
    <comment_count>1</comment_count>
    <who name="Bogdan Marinescu">bogdan.a.marinescu</who>
    <bug_when>2013-01-17 09:46:34 +0000</bug_when>
    <thetext>Do we want to have this feature for bitbake too or only for hob? In other words, should &quot;bitbake&quot; be usable like this:

$ bitbake --server server:port -t xmlrpc &lt;target&gt;

or is this feature applicable to Hob only ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28938</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2013-01-18 12:56:40 +0000</bug_when>
    <thetext>There is no good reason knotty shouldn&apos;t work with a remote server over xmlrpc?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29032</commentid>
    <comment_count>3</comment_count>
    <who name="Bogdan Marinescu">bogdan.a.marinescu</who>
    <bug_when>2013-01-22 13:06:39 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; There is no good reason knotty shouldn&apos;t work with a remote server over
&gt; xmlrpc?

There are a few that I&apos;ve found. The main problem comes from the fact that the server is initialized like this:

    server = server.BitBakeServer()
    if configuration.bind:
        server.initServer((configuration.bind, 0))
    else:
        server.initServer()

    idle = server.getServerIdleCB()

    cooker = bb.cooker.BBCooker(configuration, idle, initialenv)
    cooker.parseCommandLine()

    server.addcooker(cooker)
    server.saveConnectionDetails()
    server.detach()

As you can see, parseCommandLine is called when the server is initialized. If we switch to client/server model, the command line on the client side won&apos;t be taken into account, since it&apos;s not ever parsed. Fortunately, this is fairly easy to fix (by moving the command line parsing on the client side).
The real problem, which is related to the one above, comes from dealing with conf/local.conf. This is parsed early in the cooker (loadConfigurationData) and again, the cooker is &quot;linked&quot; with the server and initialized at server creation time. Even if we add a &quot;reparseConfigurationData&quot; method to the cooker, if the client &apos;bitbake&apos; is started from a different build directory, we need access to that build&apos;s directory conf/ files. Hob works differently in this respect, since the user sets the required configuration data in the interface and then Hob calls setVariable on the server, thus setting the proper configuration. Of course, this can be done with knotty or any other user interface too, but it definitely needs some work and should probably be the subject of another bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29033</commentid>
    <comment_count>4</comment_count>
    <who name="Bogdan Marinescu">bogdan.a.marinescu</who>
    <bug_when>2013-01-22 13:08:06 +0000</bug_when>
    <thetext>I&apos;ve uploaded my changes for this bug to the contrib/bogdanm/b3575 branch. Please review them. I&apos;d like to have a review before uploading the patches, as I expect some comments on the implementation.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>33895</commentid>
    <comment_count>5</comment_count>
    <who name="Alexandru Damian">alexandru.damian</who>
    <bug_when>2013-06-13 16:32:26 +0000</bug_when>
    <thetext>Patches are posted on the mail list and waiting integration.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>34452</commentid>
    <comment_count>6</comment_count>
    <who name="Mihai Lindner">mihai.lindner</who>
    <bug_when>2013-07-10 07:42:54 +0000</bug_when>
    <thetext>Upon resolving this bug, we would expect some references to changes that address this bug, or to some documentation that could shed some light on what we&apos;re actually looking for. Thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>34456</commentid>
    <comment_count>7</comment_count>
    <who name="Alexandru Damian">alexandru.damian</who>
    <bug_when>2013-07-10 08:29:00 +0000</bug_when>
    <thetext>please use

bitbake --server-only -t xmlrpc -B localhost:8200 

bitbake --remote-server localhost:8200 -t xmlrpc  [command]

to run commands on the remote server

the server can be on the same machine or on different machines</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>34463</commentid>
    <comment_count>8</comment_count>
    <who name="Andreea Brandusa Proca">andreea.b.proca</who>
    <bug_when>2013-07-10 10:30:21 +0000</bug_when>
    <thetext>Verified.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>