repo sync fails on docker WSL2 from Windows

Hi,

So we are currently using a Virtualbox VM for Yocto, but the new possibility for use Docker with WSL2 could increase performance, so we are trying to compile our yocto meta-layer using the new docker method.

I am following this documentation : https://www.digi.com/resources/documentation/digidocs/embedded/dey/3.2/cc6ul/yocto_t_set-up-docker-windows

The first problem was that Docker Desktop shows a advice against using directly windows filesystem volumes because there is poor performance and no “inotify events”, see https://docs.docker.com/desktop/windows/wsl/

I had some “permissions denied” errors on bitbake, so I tried again using directly a docker linux volume (using docker desktop volume tab).
Do you recommend using a WSL2 volume instead of a Windows volume ? It seems to be the “best practice” on Docker Desktop doc.

The second problem is about repo sync. This command line :
dey@b53778495448: repo sync -j 4

gets this :

remote: Enumerating objects: 1, done.
remote: Counting objects: 100% (1/1), done.
remote: Total 1 (delta 0), reused 1 (delta 0), pack-reused 0
Unpacking objects: 100% (1/1), done.
Fetching: 100% (12/12), done in 13.178s
Garbage collecting: 100% (12/12), done in 0.070s
info: A new version of repo is available
warning: repo is not tracking a remote branch, so it will not receive updates
repo reset: error: Entry ‘command.py’ not uptodate. Cannot merge.
fatal: Could not reset index file to revision ‘v2.16.7^0’.

It looks like the docker image is not up to date and cannot update because on ‘command.py’, which is a repo file. Is this error important ? How to fix this ? I want to be sure that the version I build is up to date.

Have a good day,
Mathieu Galle, Vitirover

>Do you recommend using a WSL2 volume instead of a Windows volume ?

Yes.

>The second problem is about repo sync. This command line Just tried it here and it seems to work. Are you sure you have network access?

dey@b5297259bb52:~$ uname -a
Linux b5297259bb52 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
dey@b5297259bb52:~$ cd /usr/local/dey-3.2/
dey@b5297259bb52:/usr/local/dey-3.2$ repo init -u https://github.com/digi-embedded/dey-manifest.git -b gatesgarth
remote: Enumerating objects: 1, done.
remote: Counting objects: 100% (1/1), done.
remote: Total 1 (delta 0), reused 1 (delta 0), pack-reused 0
Unpacking objects: 100% (1/1), done.

Your identity is: Digi Embedded Yocto Docker builder
If you want to change this, please re-run ‘repo init’ with --config-name

repo has been initialized in /usr/local/dey-3.2
dey@b5297259bb52:/usr/local/dey-3.2$ repo sync -j8 --no-repo-verify
Fetching: 100% (12/12), done in 9.158s
Garbage collecting: 100% (12/12), done in 0.063s
info: A new version of repo is available
repo: warning: verification of repo code has been disabled;
repo will not be able to verify the integrity of itself.

warning: repo is not tracking a remote branch, so it will not receive updates
info: Restarting repo with latest version
Fetching: 100% (11/11), done in 1.124s
Garbage collecting: 100% (11/11), done in 0.053s
Checking out: 100% (11/11), done in 2.940s
repo sync has finished successfully.
dey@b5297259bb52:/usr/local/dey-3.2$
dey@b5297259bb52:/usr/local/dey-3.2$
dey@b5297259bb52:/usr/local/dey-3.2$ repo sync -j8 --no-repo-verify
Fetching: 100% (11/11), done in 1.121s
Garbage collecting: 100% (11/11), done in 0.058s
repo sync has finished successfully.
dey@b5297259bb52:/usr/local/dey-3.2$

try deleting everything in
and then do
Install the repo tool.

To install Digi Embedded Yocto, you need the repo tool. Download repo to a directory within your path and add execution permissions.

~$ sudo curl -o /usr/local/bin/repo http://commondatastorage.googleapis.com/git-repo-downloads/repo
~$ sudo chmod a+x /usr/local/bin/repo

~$ repo init -u https://github.com/digi-embedded/dey-manifest.git -b gatesgarth
~$ repo sync -j8 --no-repo-verify

1 Like

Thanks, by reinstalling repo, deleting everything in /usr/local/dey-3.2, I managed to do this repo sync correctly :slight_smile:

good news! please click the “Select” button next to the answer to your question if your question was answered