[OE-core] proper way to bounce between two (or more) build directories?
Robert P. J. Day
rpjday at crashcourse.ca
Thu Mar 22 16:27:09 UTC 2012
On Thu, 22 Mar 2012, Scott Garman wrote:
> On 03/22/2012 04:42 AM, Robert P. J. Day wrote:
> >
> > haven't seen this mentioned anywhere and i know it's simple but
> > i want to confirm this.
> >
> > say i run oe-init-build-env to initialize a new project, part
> > of the effect of that is to prepend the OE and bitbake related
> > directories to PATH. i work there for a while, then want to put
> > that on hold to start a second build.
> >
> > i rerun oe-init-build-env to set up that second build, which
> > works fine but, unsurprisingly, that prepends the OE directories
> > to my PATH *again* (but i really have no choice, it has to be
> > done).
> >
> > after a while, i want to go back to the first project. am i
> > expected to run oe-init-build-env yet again? (prepending
> > directories yet again?)
>
> I would generally do my best to avoid working with multiple build
> areas in the same terminal, and it's definitely not a case we test
> with.
i had assumed as much, but i was curious to know the actual
difference in the working environment between two builds. sometimes
info like that is educational.
> > as best i can tell, the only change i need to make in switching
> > build directories is to reset the BUILDDIR env variable. is that
> > all that's necessary? i don't see anything else in my environment
> > that would have to be reset.
>
> Compare your env before and after running the oe-init-build-env
> script, then prepend something to unset the variables that were
> added.
i did and the only meaningful differences were (as i suspected):
* BUILDDIR is updated
* PATH kept being prepended unnecessarily with OE/bitbake dirs
> If you want to submit a patch make the oe-init-build-env script
> idempotent in this way, that could be useful.
the only thing that i can suggest is that that script check if PATH
already contains the OE dirs at the front, and not prepend them again,
but that's obviously not a big deal.
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
More information about the Openembedded-core
mailing list