Re: west: multiple local west project installations
For historical tracking, the error is because I have ZEPHYR_BASE environment variable set. Carles and I agree that the error message is not very helpful.
From: devel@... <devel@...> On Behalf Of David Leach via Lists.Zephyrproject.Org
Sent: Friday, August 16, 2019 10:27 AM
To: Cufi, Carles <Carles.Cufi@...>; steven.l.wang@...; devel@...
Subject: Re: [Zephyr-devel] west: multiple local west project installations
See the following:
dleach@dleach-test:~/work$ west init zephyrproject2
FATAL ERROR: already in an installation (/home/dleach/work/zephyrproject), aborting
That is actually incorrect, you can have as many installations as you want. In your case:
west init zephyrproject
west init mytestzephyrproject
and then do whatever you want in each of the installations, and choose one by either going into one:
west update // will only affect mytestzephyrproject
and so on.
I am not sure what makes you think that you cannot have multiple west/zephyr installations in your system, I have several myself without any problems at all.
Note that the zephyr.base-prefer setting will affect how ZEPHYR_BASE is determined though: https://docs.zephyrproject.org/latest/guides/west/config.html
I want to be able to have multiple installations on my system. To expand out my example:
I understand that I can’t instantiate a separate project directory tree from within a west created project area but I think I should be able to create multiple project directory trees. But the indication is that using west commits your whole machine to a single project.
I am not quite sure I understand David.
“west init” initializes an installation. It creates a top-level folder which then contains a .west/ subfolder and a bunch of other folders that correspond to the manifest repo and west projects.
Once you are inside that installation you cannot really refer to another installation, but you *can* switch the path to the manifest repository by using your ~/.westconfig or the “west config” command. Say you have a zephyrproject/ top-level installation folder and there’s a zephyr/ folder inside it, at the same level as the .west/ folder. Say also that you have a myrepo/ folder at the same folder level that contains a myrepo/west.yml with your own manifest. Then you can do:
west config manifest.path zephyr (&& west update)
west config manifest.path myrepo (&& west update)
to switch between manifest repos while remaining in a single installation.
no. I want to initialize a second Zephyr project area in parallel. So for example:
I'm not sure if I understand your question correctly.
Do you mean that you created "zephyrproject_2" under "/home/dleach/work/zephyrproject" and run "west init"? If so, I don't think you should create "zephyrproject_2" like this. You should create it in another directory, rather than "/home/dleach/work/zephyrproject".
On 8/16/2019 12:11 PM, David Leach wrote: