Merge lp:~cjwatson/launchpad-buildd/snap-default-branch into lp:launchpad-buildd

Proposed by Colin Watson
Status: Merged
Merged at revision: 220
Proposed branch: lp:~cjwatson/launchpad-buildd/snap-default-branch
Merge into: lp:launchpad-buildd
Diff against target: 46 lines (+13/-8)
2 files modified
buildsnap (+6/-8)
debian/changelog (+7/-0)
To merge this branch: bzr merge lp:~cjwatson/launchpad-buildd/snap-default-branch
Reviewer Review Type Date Requested Status
Evan (community) Approve
Review via email: mp+323604@code.launchpad.net

Commit message

buildsnap: If --git-repository is passed but --git-path is not, build the default branch of the repository (LP: #1688224).

To post a comment you must log in.
Revision history for this message
Evan (ev) wrote :

Looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'buildsnap'
2--- buildsnap 2017-02-10 14:53:12 +0000
3+++ buildsnap 2017-05-04 10:31:32 +0000
4@@ -114,11 +114,10 @@
5 cmd.insert(1, "-Ossl.cert_reqs=none")
6 else:
7 assert self.options.git_repository is not None
8- assert self.options.git_path is not None
9- cmd = [
10- "git", "clone", "-b", self.options.git_path,
11- self.options.git_repository, self.name,
12- ]
13+ cmd = ["git", "clone"]
14+ if self.options.git_path is not None:
15+ cmd.extend(["-b", self.options.git_path])
16+ cmd.extend([self.options.git_repository, self.name])
17 if not self.ssl_verify:
18 env["GIT_SSL_NO_VERIFY"] = "1"
19 self.run_build_command(cmd, env=env)
20@@ -181,9 +180,8 @@
21 parser.add_option("--revocation-endpoint",
22 help="builder proxy token revocation endpoint")
23 options, args = parser.parse_args()
24- if (options.git_repository is None) != (options.git_path is None):
25- parser.error(
26- "must provide both --git-repository and --git-path or neither")
27+ if options.git_repository is None and options.git_path is not None:
28+ parser.error("--git-path requires --git-repository")
29 if (options.branch is None) == (options.git_repository is None):
30 parser.error(
31 "must provide exactly one of --branch and --git-repository")
32
33=== modified file 'debian/changelog'
34--- debian/changelog 2017-02-10 14:55:42 +0000
35+++ debian/changelog 2017-05-04 10:31:32 +0000
36@@ -1,3 +1,10 @@
37+launchpad-buildd (143) UNRELEASED; urgency=medium
38+
39+ * buildsnap: If --git-repository is passed but --git-path is not, build
40+ the default branch of the repository (LP: #1688224).
41+
42+ -- Colin Watson <cjwatson@ubuntu.com> Thu, 04 May 2017 00:29:40 +0100
43+
44 launchpad-buildd (142) trusty; urgency=medium
45
46 * lpbuildd.binarypackage: Pass DEB_BUILD_OPTIONS=noautodbgsym if we have

Subscribers

People subscribed via source and target branches

to all changes: