[yocto] crops/poky workflow and git

Andrea Galbusera gizero at gmail.com
Tue Feb 27 09:47:33 PST 2018


Hi!

Anyone here regularly doing yocto builds from crops/poky [1] containers?
If I got it right, the idea behind using containers derived from
crops/poky image for builds is to keep the entire development workflow
outside the container and use the container for build related commands
only (ideally setting up the env and running bitbake).

Then, a very annoying issue I face in trying to enforce this idea as
my regular workflow is that interacting with git repositories created
while the build runs is becoming almost impossible from outside the
container, where regular git work is expected to be more conveniently
done.

The point is that repos get created when bitbake fetches sources from
within the container and git itself hardcodes absolute paths in some
of its control files. What I see is while running git from within the
repo but outside the contained scope, is git itself complaining with
messages like this:

error: object directory /workdir/blah/blah/blah does not exist; check
.git/objects/info/alternates. fatal: bad object HEAD docker

I'm using crops/poky as suggested in [1] hence bind mounting a volume
with the entire project rootdir under /workdir within the container.

Any suggestion how to make this more friendly, other than moving the
entire git workflow inside the same or another container that bind
mounts the volume at the same location? I'm curious to know if/how
people try to leverage the isolation of containers and how they do
mitigate sharp edges I found in migrating builds to them.

[1] https://github.com/crops/poky-container



More information about the yocto mailing list