Problem with ArduPilot as git submodule

Hello guys,

I build a stack/repository with multiple services, one of them ist ardupilot sitl to simulate a vehicle.
Its running on a Raspi OS Lite 64 Bit image.
Everything is build and started by a docker-compose file.
I forked the ardupilot repo and if I clone it by hand and start it with docker or docker-compose everything works fine after adding some pip packages in the dockerfile.

My problem starts if I use the forked ardupilot repo as a git submodule inside my “stack” repo.

I used “git submodule update --init --recursive”, so all files for all submodules of ardupilot are there.

I get following error and cant track it to its cause:

I tried this approach: Git Required For Build? - #10 by jcorcoran
So i changed this function to return a fake string:

def _git_head_hash(ctx, path, short=False):
return “deadc0de”

Then I got a small traceback:

I looked up the code but really see no real cause to fix my problem. Can anyone help me with that? Thanks :slight_smile:

Edit: After some searching, maybe this line in the “wsrcipt” file should be used to surpress submodule update, which is probably causing the trouble:
cfg.env.SUBMODULE_UPDATE = cfg.options.submodule_update set this to False?

I currently commented out some more code to make it work…but this looks like the cleaner way. I will try it soon and edit again for people with the same problem.