Merge ~andrey-fedoseev/launchpad-buildd:snap-target-architectures into launchpad-buildd:master

Proposed by Andrey Fedoseev
Status: Merged
Approved by: Andrey Fedoseev
Approved revision: cb4e9c129c3d3d71bab38e39aa6b9459959aed6b
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~andrey-fedoseev/launchpad-buildd:snap-target-architectures
Merge into: launchpad-buildd:master
Diff against target: 39 lines (+3/-3)
3 files modified
debian/changelog (+1/-1)
lpbuildd/target/build_snap.py (+1/-1)
lpbuildd/target/tests/test_build_snap.py (+1/-1)
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+426571@code.launchpad.net

Commit message

Replace SNAPCRAFT_BUILD_TO with SNAPCRAFT_BUILD_FOR

according to the updated snapcraft specification

To post a comment you must log in.
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
1diff --git a/debian/changelog b/debian/changelog
2index 8b90a45..7a37ee9 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -2,7 +2,7 @@ launchpad-buildd (216) UNRELEASED; urgency=medium
6
7 [ Andrey Fedoseev ]
8 * Allow specifying target architecture for snaps via
9- SNAPCRAFT_BUILD_TO environment variable
10+ SNAPCRAFT_BUILD_FOR environment variable
11
12 [ Colin Watson ]
13 * Add a timeout when revoking proxy tokens.
14diff --git a/lpbuildd/target/build_snap.py b/lpbuildd/target/build_snap.py
15index 751bb61..9a8efec 100644
16--- a/lpbuildd/target/build_snap.py
17+++ b/lpbuildd/target/build_snap.py
18@@ -186,7 +186,7 @@ class BuildSnap(BuilderProxyOperationMixin, VCSOperationMixin,
19 env["SNAPCRAFT_IMAGE_INFO"] = self.image_info
20 env["SNAPCRAFT_BUILD_ENVIRONMENT"] = "host"
21 if self.args.target_architectures:
22- env["SNAPCRAFT_BUILD_TO"] = self.args.target_architectures[0]
23+ env["SNAPCRAFT_BUILD_FOR"] = self.args.target_architectures[0]
24 output_path = os.path.join("/build", self.args.name)
25 self.run_build_command(["snapcraft"], cwd=output_path, env=env)
26 for entry in sorted(self.backend.listdir(output_path)):
27diff --git a/lpbuildd/target/tests/test_build_snap.py b/lpbuildd/target/tests/test_build_snap.py
28index 644a2c2..5d94d8d 100644
29--- a/lpbuildd/target/tests/test_build_snap.py
30+++ b/lpbuildd/target/tests/test_build_snap.py
31@@ -521,7 +521,7 @@ class TestBuildSnap(TestCase):
32 RanBuildCommand(
33 ["snapcraft"], cwd="/build/test-snap",
34 SNAPCRAFT_BUILD_INFO="1", SNAPCRAFT_IMAGE_INFO="{}",
35- SNAPCRAFT_BUILD_ENVIRONMENT="host", SNAPCRAFT_BUILD_TO="i386"),
36+ SNAPCRAFT_BUILD_ENVIRONMENT="host", SNAPCRAFT_BUILD_FOR="i386"),
37 ]))
38
39 # XXX cjwatson 2017-08-07: Test revoke_token. It may be easiest to

Subscribers

People subscribed via source and target branches