Merge lp:~cjwatson/launchpad-buildd/snap-submodules into lp:launchpad-buildd

Proposed by Colin Watson
Status: Merged
Merged at revision: 226
Proposed branch: lp:~cjwatson/launchpad-buildd/snap-submodules
Merge into: lp:launchpad-buildd
Diff against target: 44 lines (+19/-0) (has conflicts)
2 files modified
buildsnap (+10/-0)
debian/changelog (+9/-0)
Text conflict in debian/changelog
To merge this branch: bzr merge lp:~cjwatson/launchpad-buildd/snap-submodules
Reviewer Review Type Date Requested Status
William Grant Approve
Review via email: mp+324853@code.launchpad.net

Commit message

buildsnap: Initialise git submodules (LP: #1694413).

To post a comment you must log in.
Revision history for this message
William Grant (wgrant) wrote :

This sounds like it will cause currently successful builds to fail if their repos happen to include submodules that aren't accessible. I wonder if we want to "git submodule update --init --recursive" as a separate step afterwards, and not consider its failure to be fatal?

review: Approve
225. By Colin Watson

Tolerate failures when fetching git submodules.

Revision history for this message
Colin Watson (cjwatson) wrote :

Seems reasonable. Done.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'buildsnap'
2--- buildsnap 2017-05-15 16:57:31 +0000
3+++ buildsnap 2017-07-17 21:09:48 +0000
4@@ -150,6 +150,16 @@
5 if not self.ssl_verify:
6 env["GIT_SSL_NO_VERIFY"] = "1"
7 self.run_build_command(cmd, env=env)
8+ if self.options.git_repository is not None:
9+ try:
10+ self.run_build_command(
11+ ["git", "-C", self.name,
12+ "submodule", "update", "--init", "--recursive"],
13+ env=env)
14+ except subprocess.CalledProcessError as e:
15+ print(
16+ "'git submodule update --init --recursive failed with "
17+ "exit code %s (build may fail later)" % e.returncode)
18 status = {}
19 if self.options.branch is not None:
20 status["revision_id"] = self.run_build_command(
21
22=== modified file 'debian/changelog'
23--- debian/changelog 2017-07-03 14:04:31 +0000
24+++ debian/changelog 2017-07-17 21:09:48 +0000
25@@ -1,3 +1,4 @@
26+<<<<<<< TREE
27 launchpad-buildd (145) xenial; urgency=medium
28
29 * buildrecipe: Explicitly mark the local apt archive as trusted
30@@ -5,6 +6,14 @@
31
32 -- Colin Watson <cjwatson@ubuntu.com> Mon, 03 Jul 2017 15:03:51 +0100
33
34+=======
35+launchpad-buildd (145) UNRELEASED; urgency=medium
36+
37+ * buildsnap: Initialise git submodules (LP: #1694413).
38+
39+ -- Colin Watson <cjwatson@ubuntu.com> Wed, 31 May 2017 11:19:36 +0100
40+
41+>>>>>>> MERGE-SOURCE
42 launchpad-buildd (144) xenial; urgency=medium
43
44 * buildsnap: Fix revision_id computation to handle the case where

Subscribers

People subscribed via source and target branches

to all changes: