Merge lp:~tobijk/launchpad-buildd/repo-snapshot-stamp into lp:launchpad-buildd

Proposed by Tobias Koch
Status: Merged
Merged at revision: 354
Proposed branch: lp:~tobijk/launchpad-buildd/repo-snapshot-stamp
Merge into: lp:launchpad-buildd
Diff against target: 59 lines (+13/-0)
3 files modified
debian/changelog (+3/-0)
lpbuildd/livefs.py (+3/-0)
lpbuildd/target/build_livefs.py (+7/-0)
To merge this branch: bzr merge lp:~tobijk/launchpad-buildd/repo-snapshot-stamp
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+361191@code.launchpad.net

Commit message

buildlivefs: support passing REPO_SNAPSHOT_STAMP variable into environment

This is used to generate images with identical version of Debian packages
during parallelized image builds.

Description of the change

To post a comment you must log in.
354. By Tobias Koch

buildlivefs: support passing REPO_SNAPSHOT_STAMP variable into environment

This is used to generate images with identical version of Debian packages
during parallelized image builds.

Revision history for this message
Colin Watson (cjwatson) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2018-11-07 11:48:18 +0000
3+++ debian/changelog 2018-12-20 13:26:30 +0000
4@@ -5,6 +5,9 @@
5
6 [ Tobias Koch ]
7 * Update LXD backend to work with LXD 3.
8+ * buildlivefs: support passing a REPO_SNAPSHOT_STAMP variable into the
9+ environment, used to generate images with identical version of Debian
10+ packages during parallelized image builds.
11
12 -- Colin Watson <cjwatson@ubuntu.com> Thu, 25 Oct 2018 10:03:14 +0100
13
14
15=== modified file 'lpbuildd/livefs.py'
16--- lpbuildd/livefs.py 2018-10-19 06:46:23 +0000
17+++ lpbuildd/livefs.py 2018-12-20 13:26:30 +0000
18@@ -38,6 +38,7 @@
19 self.extra_ppas = extra_args.get("extra_ppas", [])
20 self.channel = extra_args.get("channel")
21 self.image_targets = extra_args.get("image_targets", [])
22+ self.repo_snapshot_stamp = extra_args.get("repo_snapshot_stamp")
23 self.debug = extra_args.get("debug", False)
24
25 super(LiveFilesystemBuildManager, self).initiate(
26@@ -65,6 +66,8 @@
27 args.extend(["--channel", self.channel])
28 for image_target in self.image_targets:
29 args.extend(["--image-target", image_target])
30+ if self.repo_snapshot_stamp:
31+ args.extend(["--repo-snapshot-stamp", self.repo_snapshot_stamp])
32 if self.debug:
33 args.append("--debug")
34 self.runTargetSubProcess("buildlivefs", *args)
35
36=== modified file 'lpbuildd/target/build_livefs.py'
37--- lpbuildd/target/build_livefs.py 2018-10-09 09:46:07 +0000
38+++ lpbuildd/target/build_livefs.py 2018-12-20 13:26:30 +0000
39@@ -53,6 +53,10 @@
40 action="append", metavar="TARGET",
41 help="produce image for TARGET")
42 parser.add_argument(
43+ "--repo-snapshot-stamp", dest="repo_snapshot_stamp",
44+ metavar="TIMESTAMP",
45+ help="build against package repo state at TIMESTAMP")
46+ parser.add_argument(
47 "--proposed", default=False, action="store_true",
48 help="enable use of -proposed pocket")
49 parser.add_argument(
50@@ -131,6 +135,9 @@
51 if self.args.image_targets:
52 base_lb_env["IMAGE_TARGETS"] = " ".join(
53 self.args.image_targets)
54+ if self.args.repo_snapshot_stamp:
55+ base_lb_env["REPO_SNAPSHOT_STAMP"] = \
56+ self.args.repo_snapshot_stamp
57 lb_env = base_lb_env.copy()
58 lb_env["SUITE"] = self.args.series
59 if self.args.datestamp is not None:

Subscribers

People subscribed via source and target branches