<div class="gmail_extra">On Thu, Nov 22, 2012 at 12:00 PM, Robert P. J. Day <span dir="ltr">&lt;<a href="mailto:rpjday@crashcourse.ca" target="_blank">rpjday@crashcourse.ca</a>&gt;</span> wrote:<br><div class="gmail_quote">

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div id=":69b">  i would find it *massively* useful to have a variation of &quot;bitbake<br>


-e&quot; print only the values of the variables that i&#39;m interested in;<br>
this would be incredibly useful in a classroom if i wanted students to<br>
take a look at just those variables related to, say, the kernel.<br>
<br>
  rather than having to hack up something using grep, it would be nice<br>
if a user could, say, define an extra variable or class and say<br>
something like:<br>
<br>
  $ bitbake -e core-image-minimal --area kernel  (or similar)<br>
<br>
where i could define that the &quot;kernel area&quot; represents the variables<br>
such as MACHINE, KMACHINE, KBRANCH, LINUX_KERNEL_TYPE and whatever<br>
variables i decide should belong to that &quot;area.&quot;  then when i&#39;m<br>
discussing the kernel, i have a simple command that immediately allows<br>
the students to see how the kernel was configured.<br>
<br>
  i realize this can&#39;t be hard -- just add some filtering code to that<br>
part of bitbake that prints everything.  thoughts?  is there a way to<br>
do this that i&#39;m not seeing?<br></div></blockquote></div><br>I would personally like to see something like:</div><div class="gmail_extra"><br></div><div class="gmail_extra">bitbake -E MACHINE,DISTRO,TMPDIR</div><div class="gmail_extra">

<br></div><div class="gmail_extra">Rather than having to define additional &#39;grouping&#39; metadata.</div><div class="gmail_extra"><br></div><div class="gmail_extra">For now, something like this might be convenient:</div>

<div class="gmail_extra"><br></div><div class="gmail_extra">$ cat ~/bin/bitbake-env</div><div class="gmail_extra"><div class="gmail_extra">#!/bin/sh</div><div class="gmail_extra">#</div><div class="gmail_extra"># bitbake-env VARIABLE [VARIBLE...]</div>

<div class="gmail_extra">#</div><div class="gmail_extra"># Filter out particular variables from bitbake -e, including the commented out</div><div class="gmail_extra"># unexpanded form, and both exported and unexported.</div>

<div class="gmail_extra"><br></div><div class="gmail_extra">args_pattern () {</div><div class="gmail_extra">    for arg; do</div><div class="gmail_extra">        printf &quot;$arg|&quot;</div><div class="gmail_extra">    done | sed &#39;s,|$,,&#39;</div>

<div class="gmail_extra">}</div><div class="gmail_extra"><br></div><div class="gmail_extra">bitbake -e | grep -E &quot;^((export )?|(# )?)($(args_pattern &quot;$@&quot;))=&quot;</div></div><div class="gmail_extra">-- <br>

Christopher Larson<br>
</div>