<?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>2934</bug_id>
          
          <creation_ts>2012-08-11 12:28:06 +0000</creation_ts>
          <short_desc>[HOB] Hob should save any customizations into the project&apos;s configuration</short_desc>
          <delta_ts>2013-03-04 12:53:27 +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>Hob</product>
          <component>hob</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.4 M4</target_milestone>
          
          <blocked>2935</blocked>
    
    <blocked>2950</blocked>
    
    <blocked>3007</blocked>
    
    <blocked>3213</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Trevor Woerner">twoerner</reporter>
          <assigned_to name="Cristiana Voicu">cristiana.voicu</assigned_to>
          <cc>alexandru.damian</cc>
    
    <cc>andreea.b.proca</cc>
    
    <cc>bluelightning</cc>
    
    <cc>cristian.iorga</cc>
    
    <cc>dongxiao.xu</cc>
    
    <cc>jessica.zhang</cc>
    
    <cc>jiajun.xu</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>shane.wang</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>23940</commentid>
    <comment_count>0</comment_count>
    <who name="Trevor Woerner">twoerner</who>
    <bug_when>2012-08-11 12:28:06 +0000</bug_when>
    <thetext>When Hob starts it begins by taking the configuration it finds in, for example,
the conf/local.conf file of the project (post &quot;source oe-init-build-env&quot;) in which
it is started (e.g. DL_DIR, BB_NUMBER_THREADS, etc). However, any changes the
user subsequently makes to any of these parameters from within Hob are not
updated in the underlying configuration files.

Only after the user explicitly clicks &quot;Save&quot; are any of these modifications
saved, but they&apos;re saved not to the project&apos;s configuration file(s) but to
a separate Hob-only configuration file in the project&apos;s &quot;.hob&quot; directory.

Ideally people should be able to achieve the same customized build result using
either the command-line or Hob for configuration and then using either the
command-line or Hob for the bake step.

It would also be great if this change could apply not just to the build
parameters in conf/local.conf but to everything a user can do within Hob
(i.e. layers, package selection, image selection, etc).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27345</commentid>
    <comment_count>1</comment_count>
    <who name="Cristiana Voicu">cristiana.voicu</who>
    <bug_when>2012-11-12 08:40:13 +0000</bug_when>
    <thetext>I have started to implement the enhancement which resolves the consistency of configuration files, I almost finished it, but I have an issue. In hob you can save the project configuration as a &quot;template&quot;. In fact, it saves all the files in .hob directory (also the configuration files from hob). What will happen when a template is loaded? It should change also the configuration files from &quot;conf/&quot; directory? If not, we will not have consistency, yes means to change configuration files from bitbake for a feature available in hob. 

Can you please advise me which is the best approach for those &quot;templates&quot;?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27391</commentid>
    <comment_count>2</comment_count>
    <who name="Trevor Woerner">twoerner</who>
    <bug_when>2012-11-13 13:32:17 +0000</bug_when>
    <thetext>In my experience, Hob never was really saving a &quot;template&quot; as such, it was
saving the full configuration (wasn&apos;t it?). In my opinion, the whole
&quot;save as template&quot; wording and functionality should be removed and replaced
with this new &quot;save configuration&quot; feature.

The workflow I was using at the time was to:
- edit some of the configuration files by hand
- start up Hob
- notice that my hand edits were present in the Hob configuration
- make more changes to the configuration using Hob
- find no way to save the configuration in Hob
- select &quot;save as template&quot;
- exit Hob and return to the cmdline
- run &quot;bitbake &lt;image&gt;&quot; on the cmdline and find my Hob edits were not honoured

In my opinion, Hob should be a second way of working with the same
configuration a user would work with from the cmdline in any given work
area (which is created with oe-init-build-env). Presently Hob creates a
second, parallel build in a work area (second to anything done on the cmdline).

In fact I&apos;m not even sure Hob needs an explicit &quot;save&quot; input from the user.
If the user changes the number of threads, why not write that to the
configuration file immediately? (but maybe that wouldn&apos;t be a popular idea)

Similarly, a user wouldn&apos;t &quot;load a template&quot; explicitly, but simply fire up
Hob in any given work area. The current configuration (conf/local.conf etc...)
would be loaded in, and manipulated by Hob.

Maybe I use Yocto differently than others, but for each project on which I
work (i.e. for each board and/or build) I make separate oe-init-build-env&apos;s.
As I switch between projects, I &apos;cd&apos; into the different project directories.
I don&apos;t start Hob once from one of them, and then work with all the others
from the same Hob instance.

How do you others feel about these ideas?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27430</commentid>
    <comment_count>3</comment_count>
    <who name="Cristiana Voicu">cristiana.voicu</who>
    <bug_when>2012-11-14 11:34:04 +0000</bug_when>
    <thetext>  I agree with you. Also, after speaking with Jessica we have agreed that we will change the &quot; save configuration&quot; functionality, by providing an menu option in hob to load the existing saved configurations and populate the corresponding local configurations.

Thanks,
Cristiana



(In reply to comment #2)
&gt; In my experience, Hob never was really saving a &quot;template&quot; as such, it was
&gt; saving the full configuration (wasn&apos;t it?). In my opinion, the whole
&gt; &quot;save as template&quot; wording and functionality should be removed and replaced
&gt; with this new &quot;save configuration&quot; feature.
&gt; 
&gt; The workflow I was using at the time was to:
&gt; - edit some of the configuration files by hand
&gt; - start up Hob
&gt; - notice that my hand edits were present in the Hob configuration
&gt; - make more changes to the configuration using Hob
&gt; - find no way to save the configuration in Hob
&gt; - select &quot;save as template&quot;
&gt; - exit Hob and return to the cmdline
&gt; - run &quot;bitbake &lt;image&gt;&quot; on the cmdline and find my Hob edits were not
&gt; honoured
&gt; 
&gt; In my opinion, Hob should be a second way of working with the same
&gt; configuration a user would work with from the cmdline in any given work
&gt; area (which is created with oe-init-build-env). Presently Hob creates a
&gt; second, parallel build in a work area (second to anything done on the
&gt; cmdline).
&gt; 
&gt; In fact I&apos;m not even sure Hob needs an explicit &quot;save&quot; input from the user.
&gt; If the user changes the number of threads, why not write that to the
&gt; configuration file immediately? (but maybe that wouldn&apos;t be a popular idea)
&gt; 
&gt; Similarly, a user wouldn&apos;t &quot;load a template&quot; explicitly, but simply fire up
&gt; Hob in any given work area. The current configuration (conf/local.conf
&gt; etc...)
&gt; would be loaded in, and manipulated by Hob.
&gt; 
&gt; Maybe I use Yocto differently than others, but for each project on which I
&gt; work (i.e. for each board and/or build) I make separate oe-init-build-env&apos;s.
&gt; As I switch between projects, I &apos;cd&apos; into the different project directories.
&gt; I don&apos;t start Hob once from one of them, and then work with all the others
&gt; from the same Hob instance.
&gt; 
&gt; How do you others feel about these ideas?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27730</commentid>
    <comment_count>4</comment_count>
    <who name="Cristiana Voicu">cristiana.voicu</who>
    <bug_when>2012-11-27 13:43:08 +0000</bug_when>
    <thetext>After a review made with RP, I have identified some weknesses for my patch. It will work weird for some examples and also it should more abstract. I have to change how the variables are store in a configuration file.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28552</commentid>
    <comment_count>5</comment_count>
    <who name="Cristiana Voicu">cristiana.voicu</who>
    <bug_when>2013-01-04 13:29:57 +0000</bug_when>
    <thetext>I have made a new implementation following the advices from RP. This can be found at http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=cvoicu/consistency-conf-files and it includes the last 4 commits.

Cristiana</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29404</commentid>
    <comment_count>6</comment_count>
    <who name="Cristiana Voicu">cristiana.voicu</who>
    <bug_when>2013-01-31 12:56:13 +0000</bug_when>
    <thetext>Patch merged to master. commit f0aef9953d3504e673c8572f1ae64cefdf678b0f
Hob now saves hte variables from local.conf and bblayers.conf directly in the build/conf directory. It saves there the variables that before were saved in build/.hob/local-default.conf and build/.hob/bblayers-default.conf.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30227</commentid>
    <comment_count>7</comment_count>
    <who name="Andreea Brandusa Proca">andreea.b.proca</who>
    <bug_when>2013-02-28 10:14:13 +0000</bug_when>
    <thetext>Verified in commit: 7d22ef28e64de06b6238d0ef9b664c0bee6efa46.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30356</commentid>
    <comment_count>8</comment_count>
    <who name="Trevor Woerner">twoerner</who>
    <bug_when>2013-03-02 16:24:54 +0000</bug_when>
    <thetext>I had a chance to test out this new code and it is looking good!
Thanks for implementing this change!


I wonder, though, seeing that it is possible to have configuration variables
such as DL_DIR and BB_NUMBER_THREADS consistent between cmdline and
Hob, would it also be possible to have Hob pick all the rest of a user&apos;s
conf/local.conf?

For example:
- MACHINE
- IMAGE_INSTALL_append

?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30383</commentid>
    <comment_count>9</comment_count>
    <who name="Cristiana Voicu">cristiana.voicu</who>
    <bug_when>2013-03-04 09:03:10 +0000</bug_when>
    <thetext>Hello,

The current implementation is for the following variables:
from local.conf : [&quot;MACHINE&quot;, &quot;PACKAGE_CLASSES&quot;, &quot;DISTRO&quot;, &quot;DL_DIR&quot;, &quot;SSTATE_DIR&quot;, &quot;SSTATE_MIRRORS&quot;, &quot;PARALLEL_MAKE&quot;, &quot;BB_NUMBER_THREADS&quot;, &quot;CONF_VERSION&quot;]
from bblayers.conf: [&quot;BBLAYERS&quot;, &quot;LCONF_VERSION&quot;]

The rest of them are still saved in .hob/template-default.hob. At the beginning, it takes all the vars from bitbake, but if you change them Hob will take them from template-default.hob.  The API to save a var could be used to save any var, but I need to know where to save. For example, if you define a variable in Hob, that was not  defined till then, there is a problem. But, the good news is that this happens rarelly.

Is this the answer you are looking for? :)
Thanks,
Cristiana

(In reply to comment #8)
&gt; I had a chance to test out this new code and it is looking good!
&gt; Thanks for implementing this change!
&gt; 
&gt; 
&gt; I wonder, though, seeing that it is possible to have configuration variables
&gt; such as DL_DIR and BB_NUMBER_THREADS consistent between cmdline and
&gt; Hob, would it also be possible to have Hob pick all the rest of a user&apos;s
&gt; conf/local.conf?
&gt; 
&gt; For example:
&gt; - MACHINE
&gt; - IMAGE_INSTALL_append
&gt; 
&gt; ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30399</commentid>
    <comment_count>10</comment_count>
    <who name="Trevor Woerner">twoerner</who>
    <bug_when>2013-03-04 12:44:26 +0000</bug_when>
    <thetext>(In reply to comment #9)
&gt; The current implementation is for the following variables:
&gt; from local.conf : [&quot;MACHINE&quot;,

I wonder about this one. In my conf/local.conf MACHINE is set to qemux86,
but when I start Hob the machine setting is set to &quot;-- select a machine --&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30400</commentid>
    <comment_count>11</comment_count>
    <who name="Cristiana Voicu">cristiana.voicu</who>
    <bug_when>2013-03-04 12:53:27 +0000</bug_when>
    <thetext>(In reply to comment #10)
&gt; (In reply to comment #9)
&gt; &gt; The current implementation is for the following variables:
&gt; &gt; from local.conf : [&quot;MACHINE&quot;,
&gt; 
&gt; I wonder about this one. In my conf/local.conf MACHINE is set to qemux86,
&gt; but when I start Hob the machine setting is set to &quot;-- select a machine --&quot;.

Aaa..this was made in special for settings(from settings, advanced settings, layers), except machine. I don&apos;t think we should take into consideration also the machine.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>