recipe builds for git projects don't work with submodules

Bug #1733603 reported by Alan Griffiths on 2017-11-21
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Corentin Noël

Bug Description

When generating the source package git submodules are not checked out.

I think all this requires is "git submodule update --init --recursive" after merging any branches.

Tags: git Edit Tag help

Related branches

Colin Watson (cjwatson) on 2017-11-21
affects: launchpad → git-build-recipe
Otto Kekäläinen (otto) wrote :

This affects our project as well. You can see it in the live here:

The error it hangs on:

CMake Error at cmake/submodules.cmake:27 (MESSAGE):
  No MariaDB Connector/C! Run

      git submodule update --init

  Then restart the build.

patrick jp (patrickelectric) wrote :

Any update over this issue ?

Colin Watson (cjwatson) on 2018-08-29
Changed in git-build-recipe:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Corentin Noël (tintou)
ezzieyguywuf (ezzieyguywuf) wrote :

The following patch fixes this bug. I cannot figure out how to fork and request a merge on launchpad.

Is anyone maintaining this tool?

diff --git a/gitbuildrecipe/ b/gitbuildrecipe/
index d1700f2..1da7f2a 100644
--- a/gitbuildrecipe/
+++ b/gitbuildrecipe/
@@ -318,6 +318,8 @@ def pull_or_clone(base_branch, target_path):
         # checkout to interpret its argument as a commit?), but that's
         # their problem.
         base_branch.git_call("checkout", base_branch.commit)
+ # initialize submodules
+ base_branch.git_call("submodule", "update", "--init", "--recursive")
     except subprocess.CalledProcessError as e:
         raise CheckoutFailed(e.output)

Sergey Ponomarev (stokito) wrote :

~tintou it looks like this bug is assigned to you. Can you share with us a status?

This problem also is mentioned here

And after the fix it would be good to leave a comment there.

Jasem Mutlaq (mutlaqja) wrote :

Was this bug resolved or Launchpad still fails with submodules?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers