Merge lp:~vorlon/launchpad-buildd/image-targets into lp:launchpad-buildd

Proposed by Steve Langasek
Status: Merged
Merge reported by: Colin Watson
Merged at revision: not available
Proposed branch: lp:~vorlon/launchpad-buildd/image-targets
Merge into: lp:launchpad-buildd
Diff against target: 47 lines (+13/-0)
2 files modified
buildlivefs (+6/-0)
debian/changelog (+7/-0)
To merge this branch: bzr merge lp:~vorlon/launchpad-buildd/image-targets
Reviewer Review Type Date Requested Status
Colin Watson (community) Needs Fixing
Review via email: mp+316648@code.launchpad.net

Description of the change

The ubuntu-cpc project is unusual in that for a single project, it produces multiple image outputs, each of which can be fairly time consuming to build. By default we want the ubuntu-cpc build to produce the full set of relevant images for the architecture, but I would find it useful to be able to specify (especially when iterating during development) that I only want a subset of images produced.

This branch proposes a syntax for passing that information through launchpad-buildd into the hook scripts via the environment. See https://code.launchpad.net/~vorlon/livecd-rootfs/image-flavors/+merge/316530 for a corresponding livecd-rootfs change.

This is distinct from subarch, as we could legitimately have both a kernel subarchitecture type and a cloud target specified as part of a single build; also, we can't legitimately pass multiple subarch options to a single build.

It is also distinct from --image-format, which is mapped to live-build's --chroot-filesystem within livecd-rootfs.

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) wrote :

This is basically fine, but I'm afraid you've missed a layer of marshalling here. I'm assuming you want to be able to set an "image_targets" list from Launchpad, and for that to work you also need to change lpbuildd/livefs.py to marshal those into --image-target arguments to buildlivefs.

review: Needs Fixing
Revision history for this message
Tobias Koch (tobijk) wrote :
Revision history for this message
Colin Watson (cjwatson) wrote :

This is effectively merged now as part of Tobias's MP.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'buildlivefs'
2--- buildlivefs 2016-12-09 18:04:00 +0000
3+++ buildlivefs 2017-02-07 22:32:49 +0000
4@@ -119,6 +119,9 @@
5 lb_env["NOW"] = self.options.datestamp
6 if self.options.image_format is not None:
7 lb_env["IMAGEFORMAT"] = self.options.image_format
8+ if self.options.image_targets is not None:
9+ base_lb_env["IMAGE_TARGETS"] = " ".join(
10+ self.options.image_targets)
11 if self.options.proposed:
12 lb_env["PROPOSED"] = "1"
13 if self.options.extra_ppas:
14@@ -146,6 +149,9 @@
15 parser.add_option(
16 "--image-format", metavar="FORMAT", help="produce an image in FORMAT")
17 parser.add_option(
18+ "--image-target", dest="image_targets", default=[], action="append",
19+ metavar="TARGET", help="produce image for TARGET")
20+ parser.add_option(
21 "--proposed", default=False, action="store_true",
22 help="enable use of -proposed pocket")
23 parser.add_option(
24
25=== modified file 'debian/changelog'
26--- debian/changelog 2016-12-09 18:05:21 +0000
27+++ debian/changelog 2017-02-07 22:32:49 +0000
28@@ -1,5 +1,6 @@
29 launchpad-buildd (142) UNRELEASED; urgency=medium
30
31+ [ Colin Watson ]
32 * lpbuildd.binarypackage: Pass DEB_BUILD_OPTIONS=noautodbgsym if we have
33 not been told to build debug symbols (LP: #1623256).
34 * debian/upgrade-config, lpbuildd.slave: Drop compatibility with ancient
35@@ -8,6 +9,12 @@
36 string/file conditional from ConfigFile.__init__.
37 * Use Python-3-compatible forms of "print" and "except".
38
39+ [ Steve Langasek ]
40+ * buildlivefs: support passing an IMAGE_TARGETS variable into the
41+ environment, for projects (i.e., ubuntu-cpc) that produce multiple
42+ images as part of a single build, in order to be selective about what
43+ builds to run.
44+
45 -- Colin Watson <cjwatson@ubuntu.com> Fri, 09 Dec 2016 16:15:49 +0000
46
47 launchpad-buildd (141) trusty; urgency=medium

Subscribers

People subscribed via source and target branches