<div class="gmail_extra">On Thu, Nov 22, 2012 at 12:00 PM, Robert P. J. Day <span dir="ltr"><<a href="mailto:rpjday@crashcourse.ca" target="_blank">rpjday@crashcourse.ca</a>></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 "bitbake<br>
-e" print only the values of the variables that i'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 "kernel area" represents the variables<br>
such as MACHINE, KMACHINE, KBRANCH, LINUX_KERNEL_TYPE and whatever<br>
variables i decide should belong to that "area." then when i'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'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'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 'grouping' 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 "$arg|"</div><div class="gmail_extra"> done | sed 's,|$,,'</div>
<div class="gmail_extra">}</div><div class="gmail_extra"><br></div><div class="gmail_extra">bitbake -e | grep -E "^((export )?|(# )?)($(args_pattern "$@"))="</div></div><div class="gmail_extra">-- <br>
Christopher Larson<br>
</div>