Merge lp:~cjwatson/launchpad-buildd/fix-livefs-proposed into lp:launchpad-buildd

Proposed by Colin Watson
Status: Merged
Approved by: Colin Watson
Approved revision: 116
Merged at revision: 115
Proposed branch: lp:~cjwatson/launchpad-buildd/fix-livefs-proposed
Merge into: lp:launchpad-buildd
Diff against target: 88 lines (+25/-7)
3 files modified
buildlivefs (+4/-3)
debian/changelog (+6/-0)
lpbuildd/livefs.py (+15/-4)
To merge this branch: bzr merge lp:~cjwatson/launchpad-buildd/fix-livefs-proposed
Reviewer Review Type Date Requested Status
Adam Conrad (community) Approve
Review via email: mp+219961@code.launchpad.net

Commit message

Fix handling of livefs builds for the -proposed pocket.

Description of the change

I discovered in local testing that livefs builds against -proposed don't currently work, because setting SUITE=utopic-proposed in the environment causes live-build to try to debootstrap utopic-proposed, which doesn't work: debootstrap only takes series names. This corrects our handling of this case, and as a bonus means that it's no longer necessary to set "proposed" to True in a metadata override for livefs builds against -proposed.

The alternative to this implementation would be to have Launchpad's LiveFSBuildBehaviour pass the series and pocket separately rather than as a single suite parameter, which does have some appeal. However, that would require another launchpad-buildd rollout in production before we can make use of the Launchpad changes even for release pocket builds, which isn't currently necessary. We can always refactor this later.

To post a comment you must log in.
Revision history for this message
Adam Conrad (adconrad) wrote :

My only complaint is the same one you note, that we should probably pass series and pocket separately, but otherwise looks fine.

review: Approve
116. By Colin Watson

Use series/pocket arguments rather than suite if they're present, and mark the suite argument as deprecated.

Revision history for this message
Adam Conrad (adconrad) wrote :

New revision looks good to me.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'buildlivefs'
2--- buildlivefs 2013-12-13 12:49:36 +0000
3+++ buildlivefs 2014-05-28 08:00:20 +0000
4@@ -121,7 +121,7 @@
5 "ubuntu-defaults-image",
6 "--locale", self.options.locale,
7 "--arch", self.options.arch,
8- "--release", self.options.suite,
9+ "--release", self.options.series,
10 ])
11 else:
12 self.run_build_command(["rm", "-rf", "auto"])
13@@ -141,7 +141,7 @@
14 if self.options.subarch is not None:
15 base_lb_env["SUBARCH"] = self.options.subarch
16 lb_env = dict(base_lb_env)
17- lb_env["SUITE"] = self.options.suite
18+ lb_env["SUITE"] = self.options.series
19 if self.options.datestamp is not None:
20 lb_env["NOW"] = self.options.datestamp
21 if self.options.image_format is not None:
22@@ -165,7 +165,8 @@
23 parser.add_option(
24 "--subproject", metavar="SUBPROJECT",
25 help="build for subproject SUBPROJECT")
26- parser.add_option("--suite", metavar="SUITE", help="build for suite SUITE")
27+ parser.add_option(
28+ "--series", metavar="SERIES", help="build for series SERIES")
29 parser.add_option("--datestamp", help="date stamp")
30 parser.add_option(
31 "--image-format", metavar="FORMAT", help="produce an image in FORMAT")
32
33=== modified file 'debian/changelog'
34--- debian/changelog 2014-05-13 15:50:19 +0000
35+++ debian/changelog 2014-05-28 08:00:20 +0000
36@@ -1,3 +1,9 @@
37+launchpad-buildd (123) UNRELEASED; urgency=medium
38+
39+ * Fix handling of livefs builds for the -proposed pocket.
40+
41+ -- Colin Watson <cjwatson@ubuntu.com> Sun, 18 May 2014 14:18:49 +0100
42+
43 launchpad-buildd (122) hardy; urgency=medium
44
45 * Drop the status_dict XML-RPC method, now that the master uses the
46
47=== modified file 'lpbuildd/livefs.py'
48--- lpbuildd/livefs.py 2014-05-03 14:48:19 +0000
49+++ lpbuildd/livefs.py 2014-05-28 08:00:20 +0000
50@@ -42,10 +42,21 @@
51 self.subarch = extra_args.get("subarch")
52 self.project = extra_args["project"]
53 self.subproject = extra_args.get("subproject")
54- self.suite = extra_args["suite"]
55+ if "series" in extra_args:
56+ self.series = extra_args["series"]
57+ self.pocket = extra_args["pocket"]
58+ else:
59+ # For compatibility; remove once launchpad-buildd 123 is
60+ # deployed in production and the Launchpad master has been
61+ # adjusted to pass series and pocket rather than suite.
62+ suite = extra_args["suite"]
63+ if "-" in suite:
64+ self.series, self.pocket = suite.rsplit("-", 1)
65+ else:
66+ self.series = suite
67+ self.pocket = "release"
68 self.datestamp = extra_args.get("datestamp")
69 self.image_format = extra_args.get("image_format")
70- self.proposed = extra_args.get("proposed", False)
71 self.locale = extra_args.get("locale")
72
73 super(LiveFilesystemBuildManager, self).initiate(
74@@ -63,12 +74,12 @@
75 args.extend(["--project", self.project])
76 if self.subproject:
77 args.extend(["--subproject", self.subproject])
78- args.extend(["--suite", self.suite])
79+ args.extend(["--series", self.series])
80 if self.datestamp:
81 args.extend(["--datestamp", self.datestamp])
82 if self.image_format:
83 args.extend(["--image-format", self.image_format])
84- if self.proposed:
85+ if self.pocket == "proposed":
86 args.append("--proposed")
87 if self.locale:
88 args.extend(["--locale", self.locale])

Subscribers

People subscribed via source and target branches

to all changes: