Do_mender_uboot_auto_configure fails due to multiple users running the build

We have mender integrated with our yocto Rocko build. When we do separate builds under two different usernames (not at the same time), we get the following error:

Error opening lock file /var/lock/fw_printenv.lock

Checking the file permissions, the lock file was written by the last user to do a full build.

It appears that fw_printenv writes a global lockfile outside of the yocto environment. I don’t know if this is a problem with mender or with u-boot but I figured I’d post about it in case anybody else has had the problem.

I think this looks like a bug in meta-mender in rocko which was fixed in sumo

Thanks for the quick response. I’m glad to hear it’s already fixed. Someday a new BSP will come out and our product can be upgraded off of Rocko. In the mean time, this bug is easy to work around.

might be worth raising the issue in the issue tracker, as the rocko branch is still maintained by the looks of it and looks like a trivial process to cherry-pick the patch from sumo into rocko.

@lluiscampos can you see if this patch can be backported to Rocko?

1 Like

Thanks @dellgreen for easily spotting the patch!

Even though rocko is not maintained (see Compatibility table at Mender Docs) I launched a PR in GitHub to backport this patch to rocko, ref meta-mender #1156, as it seems it will help @ckelloug2 and possibly others in this branch.

1 Like

@ckelloug2 @drewmoseley Sorry for the late response on this. We decided against porting this to rocko. See reasoning in the Pull Request.