I have installed yotta in a Docker container, following the instructions at Introduction - Introduction to Mbed OS 6 | Mbed OS 6 Documentation. It seems to work as expected except for one point - when the project is created, all files and directories are created as root, so I need to use sudo to access anything. Is there some configuration I can use to get the files created with normal user permissions?
I am running Ubuntu 15.10, Docker 1.9.1 and am a member of the docker group so I can run it as a normal user.
That looks better - files are being created with the permissions of the current user. I tried running “yotta.sh build” on a project created before the change and got this message - is it related to the change made?:
info: generate for target: st-nucleo-f401re-gcc 0.2.1 at /yotta_home/work/blinky/yotta_targets/st-nucleo-f401re-gcc CMake Error: The current CMakeCache.txt directory /yotta_home/work/blinky/build/st-nucleo-f401re-gcc/CMakeCache.txt is different than the directory /yotta/blinky/build/st-nucleo-f401re-gcc where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt error: command ['cmake', '-D', 'CMAKE_BUILD_TYPE=RelWithDebInfo', '-G', 'Ninja', '.'] failed
On line 7 in the new version of the script, I see that YT_HOME is set to /yotta_home. If this was instead set to /yotta, would this not make the old/new structures the same?
Apologies for not trying this before suggesting - I’m not at a PC I can test against.